void Start() { lerpMovement = GetComponent <LerpMovement>(); lerpMovement.OnMovementCompleted += LerpMovement_OnMovementCompleted; gameManager = GameManager.instance; }
private void enterTransition() { _switchState = false; int subBossIndex = 0; for (int i = 0; i < this.RotationPoints.Length && subBossIndex < this.SubBosses.Count; ++i) { LerpMovement subBoss = this.SubBosses[subBossIndex].GetComponent <LerpMovement>(); subBoss.BeginMovement(this.RotationPoints[i].position, this.TimeForSinglePath); ++subBossIndex; } _timedCallbacks.AddCallback(this, switchState, this.TimeForSinglePath + 0.1f); }
private void enterAligning() { _switchState = false; _alignmentsToFinish = this.SubBosses.Count; _spawnCooldown = -1.0f; for (int i = 0; i < this.SubBosses.Count; ++i) { this.SubBosses[i].GetComponent <Actor2D>().RemoveVelocityModifier(Damagable.VELOCITY_MODIFIER_KEY); this.SubBosses[i].GetComponent <Damagable>().Stationary = true; LerpMovement lerpMovement = this.SubBosses[i].GetComponent <LerpMovement>(); lerpMovement.AddCallback(movementFinished); lerpMovement.BeginMovement(this.transform.localToWorldMatrix.MultiplyPoint(this.SubBosses[i].GetComponent <StartingPosition>().Local()), this.TimeToRealign); } }
// Use this for initialization void Start() { gameManager = FindObjectOfType <GameManager>(); lerpMovement = GetComponent <LerpMovement>(); }
// Start is called before the first frame update void Start() { lerp = GetComponent <LerpMovement>(); lerp.Move(points[actualPoint]); }