PlayerAttack.Start C# (CSharp) Method

Start() public method

public Start ( ) : void
return void
    void Start()
    {
        attackTimer = 0;
        coolDown = 2.0f;
    }

Usage Example

Example #1
0
 //to get player movement and set its parent
 //call movement start method
 //find foot object
 public virtual void Start( )
 {
     if (bInit)
     {
         movement     = GetComponent <PlayerMovement> ( );
         attack       = GetComponent <PlayerAttack> ( );
         health       = GetComponent <PlayerHealth> ( );
         paintball    = GetComponent <PlayerPaintball> ( );
         skill        = GetComponent <ISkill> ( );
         animator     = GetComponent <Animator> ( );
         UI           = GameObject.Find(numPlayer + "UI").GetComponent <PlayerUI> ( );
         skill.Parent = this;
         skill.SetActive(true);
         UI.Parent        = this;
         health.Parent    = this;
         attack.Parent    = this;
         movement.Parent  = this;
         paintball.Parent = this;
         UI.Start( );
         attack.Start( );
         movement.Start( );
         health.Start( );
         paintball.Start( );
         //footObject = transform.Find ("Foot").gameObject;
     }
 }
All Usage Examples Of PlayerAttack::Start