コード例 #1
0
 // Use this for initialization
 void Start()
 {
     rigidBody = GetComponent<Rigidbody2D>();
     controle_disparo = GetComponent<Controle_Disparo>();
     controle_disparo.shotDirection = 0;
     sr = GetComponentInChildren<SpriteRenderer>();
     gray = sr.color;
 }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        if(!GameControl.playersOn[number-1]){
            Destroy(this.gameObject);
            return;
        }

        body = GetComponent<Rigidbody2D>();
        controleDisparo = GetComponent<Controle_Disparo>();
        animator = GetComponent<Animator>();
        animator2 = transform.GetChild(0).gameObject.GetComponent<Animator>();
        controleDisparo.user = number;
        ColorxLife ml = new ColorxLife();
        ml.color = number;
        ml.life = 100;
        vida.Add(ml);
        GameControl.playersList.Add(this.gameObject);
    }
コード例 #3
0
ファイル: Splash_Actor.cs プロジェクト: Cherobin/acate_2015
 // Use this for initialization
 void Start()
 {
     rb = GetComponent<Rigidbody2D>();
     animator = GetComponent<Animator>();
     animator2 = transform.GetChild(0).gameObject.GetComponent<Animator>();
     controleDisparo = GetComponent<Controle_Disparo>();
 }
コード例 #4
0
 // Use this for initialization
 void Start()
 {
     controle_disparo = GetComponent<Controle_Disparo>();
     gray = GetComponentInChildren<SpriteRenderer>().color;
 }