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