Example #1
0
        void Start()
        {
            m_SpeedMultiplier = 1.0f;
            m_IsMoving        = true;
            m_PlayerMovement  = GameMaster.Instance.m_PlayerMovement;
            m_PlayerStats     = GameMaster.Instance.m_PlayerStats;
            CircleCollider2D playerCircleCollider = m_PlayerMovement.GetComponent <CircleCollider2D>();

            if (playerCircleCollider != null)
            {
                m_PlayerColliderRadius = playerCircleCollider.radius;
            }

            // Cap base speed
            if (m_BaseSpeed > m_MaxSpeed)
            {
                m_BaseSpeed = m_MaxSpeed;
            }
        }
Example #2
0
 public MoveSpeedPerk(GameObject player) {
     movement = player.GetComponentInChildren<PlayerMovement>();
 }
Example #3
0
 void Awake()
 {
     instance            = this;
     this.characterModel = this.transform.GetChild(0).gameObject;
     PlayerController.instance.charactorAnimator = this.characterModel.GetComponent <Animator>() as Animator;
 }
Example #4
0
 void Awake() {
     instance = this;
     this.characterModel = this.transform.GetChild(0).gameObject;
     PlayerController.instance.charactorAnimator = this.characterModel.GetComponent<Animator>() as Animator;
 }
Example #5
0
 private void Update()
 {
     PlayerMovement.ManageInput();
     PlayerInteract.ManageInput();
 }
Example #6
0
        void Awake()
        {
            anim = GetComponent<Animator>();
            playerAudio = GetComponent<AudioSource>();
            playerMovement = GetComponent<PlayerMovement>();
            playerShooting = GetComponent<PlayerShooting>();

            ResetHealth();
        }
Example #7
0
 // Use this for initialization
 void Start()
 {
     playerObj  = FindObjectOfType <PlayerMovement>();
     playerAnim = playerObj.GetComponent <Animator>();
 }