Exemplo n.º 1
0
    void Awake()
    {
        M8.SceneManager.instance.AddTransition(this);

        mTakeOutInd = animator.GetTakeIndex(takeOut);
        mTakeInInd  = animator.GetTakeIndex(takeIn);

        activeGO.SetActive(false);
    }
Exemplo n.º 2
0
    void Awake()
    {
        if (!unit)
        {
            unit = GetComponent <UnitEntity>();
        }

        unit.setStateCallback += OnUnitChangeState;

        mTakeAirInd             = animator.GetTakeIndex(takeAir);
        mTakeGroundIdleInd      = animator.GetTakeIndex(takeGroundIdle);
        mTakeGroundIdleDelayInd = animator.GetTakeIndex(takeGroundIdleDelay);
        mTakeGroundMoveInd      = animator.GetTakeIndex(takeGroundMove);
        mTakeGroundPushInd      = animator.GetTakeIndex(takeGroundPush);
    }
Exemplo n.º 3
0
    void Awake()
    {
        if (Checkpoint.startAvailable)
        {
            transform.position    = Checkpoint.startPosition;
            transform.eulerAngles = new Vector3(0f, 0f, Checkpoint.startRotation);

            Checkpoint.RemoveStart();
        }

        if (quitActiveGO)
        {
            quitActiveGO.SetActive(false);
        }

        var camFollowGO = GameObject.FindGameObjectWithTag(cameraTagFollow);

        mCameraFollow = camFollowGO.GetComponent <CameraFollow>();

        var cameraFollowTrans = mCameraFollow.transform;

        cameraFollowTrans.position = transform.position;
        cameraFollowTrans.rotation = transform.rotation;

        stateControl.stateChangedEvent.AddListener(OnStateChanged);

        signalGameReady.callback   += OnGameReady;
        signalInputLock.callback   += OnInputLock;
        signalInputUnlock.callback += OnInputUnlock;

        mTakeIndIdle      = animator.GetTakeIndex(takeIdle);
        mTakeIndMove      = animator.GetTakeIndex(takeMove);
        mTakeIndAir       = animator.GetTakeIndex(takeAir);
        mTakeIndWallSlide = animator.GetTakeIndex(takeWallSlide);
        mTakeIndSlide     = animator.GetTakeIndex(takeSlide);

        animator.ResetTake(takeSpawn);

        if (input)
        {
            input.ActionAddCallback(OnAct);
        }
    }
Exemplo n.º 4
0
    void Awake()
    {
        mTakeInd = animator.GetTakeIndex(take);

        signal.callback += OnSignal;
    }
Exemplo n.º 5
0
 void Awake()
 {
     mTakeInd = animator.GetTakeIndex(take);
 }