public override void Initialize(AbstractBoss boss) { base.Initialize(boss); Boss.AngularVelocity = 300f; _initialAcceleration = Boss.Acceleration; }
public void Initialize() { if (!Boss) { Boss = FindObjectOfType <AbstractBoss>(); } if (!Boss) { Debug.Log("No boss found"); } else { Boss.OnDeath.AddListener(OnBossDeath); } _fsm = GetComponent <Animator>(); Player.OnPlayerDeath.AddListener(OnPlayerDeath); BulletManager.LoadPatterns(); BulletPhysics.OnCollision.AddListener(OnBulletCollision); CameraManager.OnCameraZoomFinished.AddListener(OnCameraZoomFinished); Reset(); }
public virtual void Initialize(AbstractBoss boss) { Boss = boss; CurrentBehaviourLife = InitialBehaviourLife; BehaviourEnded = false; _isRunning = false; }
public void LoadBoss(EBoss BossType) { // TODO: Should create a new instance of a boss according to the given type var bossPrefab = BossStore.GetBossPrefab(BossType); if (bossPrefab) { var bossObject = Instantiate(bossPrefab); Boss = bossObject.GetComponent <AbstractBoss>(); } }
// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { Animator = animator; StateInfo = stateInfo; LayerIndex = layerIndex; Boss = animator.transform.parent.gameObject.GetComponent <AbstractBoss>(); if (Boss == null) { Debug.LogError("No Boss found for this Behaviour."); } }
public void Setup(AbstractBoss boss) { isBulletAlive = true; this.boss = boss; }
public void Initialize(AbstractBoss boss) { _boss = boss; }