Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     m_RigidBody   = GetComponent <Rigidbody>();
     m_Gravity     = GetComponent <StickToPlanet>();
     controls      = GetComponent <Controls>();
     m_PlayerStats = GetComponent <PlayerStats>();
 }
 // Use this for initialization
 void Start()
 {
     m_RigidBody   = GetComponent <Rigidbody>();
     m_PlayerStats = GetComponent <PlayerStats>();
     m_Controls    = GetComponent <Controls>();
     m_Shoot       = GetComponent <Shoot>();
     m_Gravity     = GetComponent <StickToPlanet>();
     m_Move        = GetComponent <PlayerMoveOnPlanet>();
     //m_Animator = GetComponentInChildren<Animator>();
 }
Exemplo n.º 3
0
 private void Awake()
 {
     m_Rigidbody       = GetComponent <Rigidbody>();
     m_particleManager = Instantiate <GameObject>(m_particleManager);
     m_bulletParticles = m_particleManager.GetComponent <BulletParticles>();
     m_bulletParticles.transform.position = transform.position;
     m_bulletParticles.velocity           = -GetComponent <Rigidbody>().velocity / 5;
     m_bulletParticles.random             = -m_bulletParticles.velocity.normalized;
     m_rigidbody     = GetComponent <Rigidbody>();
     m_StickToPlanet = GetComponent <StickToPlanet>();
     m_Gravity       = GetComponent <StickToPlanet>();
 }
Exemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     //set all of the needed scripts
     m_RigidBody   = GetComponent <Rigidbody>();
     m_Gravity     = GetComponent <StickToPlanet>();
     m_PlayerStats = GetComponent <PlayerStats>();
     m_Rend        = GetComponent <Renderer>();
     m_controls    = GetComponent <Controls>();
     l_boosts      = 0;
     //Set player colour for boost reset.
     m_startCooldown = false;
     //Get the boost big hit collider [cam]
     m_BoostCollider = GetComponentInParent <Unique>().GetComponentInChildren <BoostCollider>();
     m_BoostCollider.PlayerLink(m_PlayerStats);
 }
Exemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        playerStats = GetComponent <PlayerStats>();
        m_Gravity   = GetComponent <StickToPlanet>();
        m_RigidBody = GetComponent <Rigidbody>();
        //m_Animator = GetComponentInChildren<Animator>();

        movementStates.AttachDefaultState(playerStats.PlayerDriftStateString, driftState);
        movementStates.AttachState(playerStats.PlayerJumpStateString, jumpState);
        movementStates.AttachState(playerStats.PlayerOnPlanetStateString, onPlanetState);
        movementStates.AttachState(playerStats.PlayerBoostActiveString, boostActiveState);
        movementStates.AttachState(playerStats.PlayerBoostChargeString, boostChargeState);
        movementStates.AttachState(playerStats.PlayerBigHitState, bigHitState);
        movementStates.AttachState(playerStats.PlayerRespawnState, respawnState);

        stunTimer = 3f;
        movementStates.enabled = false;
    }
Exemplo n.º 6
0
 private void Awake()
 {
     _stickToPlanet = Target.gameObject.GetComponent <StickToPlanet>();
     // disable hieracy transform, use local transform
     transform.SetParent(transform.parent.transform, false);
 }
Exemplo n.º 7
0
 void OnEnable()
 {
     stickObject = (StickToPlanet)target;
 }