コード例 #1
0
ファイル: Follower.cs プロジェクト: TyLanger/TimeLoop
    void Update()
    {
        /// Testing

        /*
         * if(Input.GetButtonDown("Jump"))
         * {
         *  timeOffset = 1;
         * }
         * if(Input.GetButtonDown("Fire1"))
         * {
         *  timeOffset = 2;
         * }
         */

        if (currentNextAction == null && followerTarget.actionHistory.Count > 0)
        {
            currentNextAction = followerTarget.actionHistory[0];

            // figure out what type of action it is
            nextActionCoroutine = StartCoroutine(Shoot((timeOffset + currentNextAction.time) - Time.time));
        }
    }
コード例 #2
0
ファイル: Follower.cs プロジェクト: TyLanger/TimeLoop
 void ClearCurrentAction()
 {
     followerTarget.actionHistory.RemoveAt(0);
     currentNextAction = null;
 }