Exemple #1
0
    void Awake()
    {
        groundCheck = transform.Find("groundCheck");
        rigidbody2D = GetComponent <Rigidbody2D> ();
        jumpButton  = GetComponent <JumpButton> ();
        photonView  = GetComponent <PhotonView> ();
        Debug.Log(jumpButton);
        moveJoysticker = GameObject.Find("JoystickerContainer").GetComponent <JoyStickerController> ();

        if (!photonView.isMine)
        {
            GetComponent <SpriteRenderer> ().color = Color.red;
        }
    }
Exemple #2
0
    void Awake()
    {
        GetComponent <SpriteRenderer>().color = Color.red;
        rigibody = GetComponent <Rigidbody2D>();

        moveJoystick = GameObject.Find("moveJ").GetComponent <JoyStickerController>();
        fireJoystick = GameObject.Find("fireJ").GetComponent <JoyStickerController>();

        this.name = "enemy";
        hpshow    = this.transform.Find("hp").GetComponent <hpShow>();
        uilive    = GameObject.Find("rightlive");

        mpshow = this.transform.Find("mp").GetComponent <MpShow>();
        mpshow.gameObject.SetActive(false);
    }