コード例 #1
0
    void Start()
    {
        rot = GetComponent <Rotate> ();
        GameObject obj = GameObject.FindWithTag("GameController");

        gController = obj.GetComponent <WinLoseMessage> ();
    }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        GameObject obj = GameObject.FindWithTag("GameController");

        gameController = obj.GetComponent <RandomDrop>();
        win            = obj.GetComponent <WinLoseMessage> ();
        GameObject p = GameObject.FindWithTag("Player");

        pController = p.GetComponent <PlayerController> ();
    }
コード例 #3
0
    void Start( )
    {
        if (useLivesOnly)
        {
            maxHealth      = 1.0f;
            startingHealth = 1.0f;
        }
        if (this.tag == "Enemy")
        {
            anim = GetComponent <MyAnimator> ();
        }
        currentHealth = startingHealth;
        GameObject obj = GameObject.FindWithTag("GameController");

        gameController = obj.GetComponent <WinLoseMessage> ();
        GameObject model = GameObject.FindWithTag("Animated");

        charAnim = model.GetComponent <CharAnim> ();
    }