コード例 #1
0
    void Start()
    {
        lerpMovement = GetComponent <LerpMovement>();
        lerpMovement.OnMovementCompleted += LerpMovement_OnMovementCompleted;

        gameManager = GameManager.instance;
    }
コード例 #2
0
    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);
    }
コード例 #3
0
    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);
        }
    }
コード例 #4
0
 // Use this for initialization
 void Start()
 {
     gameManager  = FindObjectOfType <GameManager>();
     lerpMovement = GetComponent <LerpMovement>();
 }
コード例 #5
0
 // Start is called before the first frame update
 void Start()
 {
     lerp = GetComponent <LerpMovement>();
     lerp.Move(points[actualPoint]);
 }