Exemplo n.º 1
0
 public void OnBack()
 {
     //Debug.Log("gameobject : " + this.name);
     //Debug.Log("de activate: " + gameObject.name);
     //Debug.Log("activate: " + PlayerMesh.name);
     //Debug.Log("activate: " + PlayerSelection.name);
     gameObject.SetActive(false);
     PlayerMesh.SetActive(true);
     PlayerSelection.SetActive(true);
 }
Exemplo n.º 2
0
    void Awake()
    {
        transform.parent = General.GetParent("Players");
        gameController   = GameObject.FindObjectOfType <GameController>();
        spriteRenderer   = transform.FindChild("Sprite").GetComponent <SpriteRenderer>();
        selection        = GetComponentInChildren <PlayerSelection>();
        selection.SetActive(false);

        thisRigidbody = GetComponent <Rigidbody2D>();
        mass          = thisRigidbody.mass;

        playerIA = GetComponent <PlayerIA>();

        SetAiming(false);
        // In the start the player is not playable
        // Wait for the start
        SetNonPlayable();
    }
Exemplo n.º 3
0
 void SetAiming(bool aiming)
 {
     isAiming = aiming;
     selection.SetActive(aiming);
 }