예제 #1
0
        /// <summary>
        /// Author: Denis
        /// Initial setup
        /// </summary>
        private void Awake()
        {
            ControllerActions = new ControllerInput();
            IsDashing         = false;
            DashOnCooldown    = false;

            Type = MovementModifier.MovementType.Dash;
        }
예제 #2
0
        /// <summary>
        /// Author: Denis
        /// Initial setup
        /// </summary>
        private void Awake()
        {
            ControllerActions = new ControllerInput();
            IsGroundPound     = false;
            BlockInput        = false;

            Type = MovementModifier.MovementType.GroundPound;
        }
예제 #3
0
        /// <summary>
        /// Author: Denis
        /// Initial setup
        /// </summary>
        private void Awake()
        {
            PhotonView        = GetComponent <PhotonView>();
            ControllerActions = new ControllerInput();
            ChargingPullDash  = false;
            PullDashCharged   = false;
            IsPullDashing     = false;
            DisableGravity    = false;
            BlockInput        = false;

            Type = MovementModifier.MovementType.PullDash;
        }
예제 #4
0
        /// <summary>
        /// Author: Denis
        /// Initial setup
        /// </summary>
        private void Awake()
        {
            ControllerActions    = new ControllerInput();
            IsGrounded           = true;
            IsFalling            = false;
            HasJumped            = false;
            CanCoyoteHop         = false;
            WasGroundedLastFrame = false;
            PlayedLandingAnim    = false;
            WithinSmashDistance  = false;
            BlockInput           = false;
            HasSecondJump        = false;

            Type = MovementModifier.MovementType.Jump;
        }
예제 #5
0
    /// <summary>
    /// Author: Ziqi Li
    /// </summary>
    void Start()
    {
        // initialization
        if (isOffLine)
        {
            PhotonNetwork.OfflineMode = true;
        }
        PhotonView = this.GetComponent <PhotonView>();
        RigidBody  = this.GetComponent <Rigidbody>();

        isTriggered = isAutomatic;

        // Need at least 2 points to move
        if (PathPointObjects.Count > 1)
        {
            // convert to a Vector3 list
            foreach (GameObject obj in PathPointObjects)
            {
                PathPoints.Add(obj.transform.position);
            }
            _CurrentTarget      = PathPoints[0];
            _CurrentTargetIndex = 0;
        }

        if (isOffLine || PhotonView.IsMine)
        {
            CurrentCoroutine = StartCoroutine(StartMotion(isTriggered));
        }

        //Setting up elevator efffect on players
        Type = MovementModifier.MovementType.Contraption;
        PlayerMovementHandlerList = new List <MovementHandler>();
        GameObject[] _Players = GameObject.FindGameObjectsWithTag("Player");

        for (int i = 0; i < _Players.Length; i++)
        {
            PlayerMovementHandlerList.Add(_Players[i].GetComponent <MovementHandler>());
        }
    }
예제 #6
0
 /// <summary>
 /// Author: Denis
 /// Initial setup
 /// </summary>
 private void Awake()
 {
     Type = MovementModifier.MovementType.Knockback;
 }
예제 #7
0
 /// <summary>
 /// Author: Denis
 /// Initial setup
 /// </summary>
 private void Awake()
 {
     Type = MovementModifier.MovementType.Walk;
 }