Game Development Reference
In-Depth Information
public GameObject dropFXSpawnPoint = null;
public List<GameObject> dropNodeList =
new List<GameObject>();
public GameObject bossDeathFX = null;
public GameObject bossDropFX = null;
public TakeDamageFromPlayerBullet
bulletColliderListener = null;
public float MovespeedmoveSpeed = 0.1f;
public float eventWaitDelay = 3f;
// Amount of time to wait between each event
public int enemiesToStartBattle = 10;
public enum bossEvents
{
inactive = 0,
fallingToNode,
waitingToJump,
waitingToFall,
jumpingOffPlatform
}
// Current event to cycle on each Update() pass
public bossEvents currentEvent = bossEvents.inactive;
The boss is a bit more complex than your average run-of-the-mill red dome on
treads. As a result, he will need a number of additional variables to track what's
going on. The biggest ones you'll want to pay attention to here are the event timers ,
which—as you may expect—control events in the battle sequence based on engine
time. The following variables are used to control the timed boss events:
// The node object that the boss will be
falling towards.
private GameObject targetNode = null;
// Amount of time to wait until jumping or
falling again.
private float timeForNextEvent = 0.0f;
// Target position used for when jumping off a platform.
private Vector3 targetPosition = Vector3.zero;
 
Search WWH ::




Custom Search