예제 #1
0
        // Use this for initialization
        void Start()
        {
            FacingRight = true;

            rewind          = GetComponent <CharacterRewindHandler> ();
            physics         = GetComponent <PlayerPhysics> ();
            playerAnimation = GetComponent <PlayerAnimation> ();
            rewindScene     = GameObject.FindObjectOfType <RewindSceneController> ();
        }
        // Use this for initialization
        void Start()
        {
            if (!LaserPrefab)
            {
                Debug.LogError("Please set laser prefab");
            }
            else
            {
                if (ShootSprite != null)
                {
                    rend = GetComponent <SpriteRenderer> ();
                }

                rewind = GetComponent <CharacterRewindHandler> ();
            }
        }
예제 #3
0
        // Use this for initialization
        void Start()
        {
            rewind   = GetComponent <CharacterRewindHandler> ();
            physics  = GetComponent <Physics> ();
            animator = GetComponent <Animator> ();

            movementCommands = new MovementWithPhysicsCommand[MovesInEachDirection * 2];

            for (int i = 0; i < movementCommands.Length / 2; i++)
            {
                movementCommands [i] = new MovementWithPhysicsCommand(transform, new Vector2(1, -1) * MoveSpeed, physics);
            }

            for (int i = movementCommands.Length / 2; i < movementCommands.Length; i++)
            {
                movementCommands [i] = new MovementWithPhysicsCommand(transform, new Vector2(-1, -1) * MoveSpeed, physics);
            }
        }
예제 #4
0
 // Use this for initialization
 void Start()
 {
     rewind   = GetComponent <CharacterRewindHandler> ();
     animator = GetComponent <Animator> ();
 }
예제 #5
0
 // Use this for initialization
 void Start()
 {
     animator = GetComponent <Animator> ();
     rewind   = GetComponent <CharacterRewindHandler> ();
     InitAnimationCommands();
 }
예제 #6
0
 // Use this for initialization
 void Start()
 {
     rewind = GetComponent <CharacterRewindHandler> ();
 }
예제 #7
0
 public void RegisterRewindHandler(CharacterRewindHandler rewind)
 {
     rewindHandlers.Add(rewind);
 }