Exemple #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> ();
            }
        }
        // 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);
            }
        }
Exemple #4
0
 // Use this for initialization
 void Start()
 {
     rewind   = GetComponent <CharacterRewindHandler> ();
     animator = GetComponent <Animator> ();
 }
Exemple #5
0
 // Use this for initialization
 void Start()
 {
     animator = GetComponent <Animator> ();
     rewind   = GetComponent <CharacterRewindHandler> ();
     InitAnimationCommands();
 }
 // Use this for initialization
 void Start()
 {
     rewind = GetComponent <CharacterRewindHandler> ();
 }
Exemple #7
0
 public void RegisterRewindHandler(CharacterRewindHandler rewind)
 {
     rewindHandlers.Add(rewind);
 }