Start() public méthode

public Start ( ) : void
Résultat void
Exemple #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;
     }
 }
    // Start is called before the first frame update
    void Start()
    {
        m_health.Init(this);
        m_movement.Init(this);
        m_groundDetection.Init(this);

        m_health.Start();
        m_movement.Start();

        m_rb = GetComponent <Rigidbody2D>();
    }
Exemple #3
0
    void restartRound()
    {
        roundRestart.explosionCountdown = timer;
        hotStarter = playerList[Random.Range(0, playerList.Count)];

        if (startNewRound1 != null)
        {
            startNewRound1.Start();
        }
        if (startNewRound2 != null)
        {
            startNewRound2.Start();
        }
        if (startNewRound3 != null)
        {
            startNewRound3.Start();
        }
        if (startNewRound4 != null)
        {
            startNewRound4.Start();
        }
    }
 /// <summary>
 /// Called once before the first frame
 /// </summary>
 private void Start()
 {
     m_plLook.Start();
     m_pmMovement.Start();
 }