コード例 #1
0
    // Use this for initialization
    void Start()
    {
        arrowTran  = transform.Find("heroarrow");
        bowTran    = transform.Find("HeroArm");
        arrowSpawn = bowTran.Find("heroarm").Find("arrowSpawn");
        bowAnim    = bowTran.GetComponent <Animator>();
        hand       = bowTran.GetComponent("HeroArm") as HeroArm;
        hand.HideHand();
        line = GetComponent <LineRenderer>();

        damageTexture       = GameObject.Instantiate(textureType, new Vector3(0, 0, 0), Quaternion.Euler(new Vector3(0, 0, 0))) as GUITexture;
        damageColor         = new Color(1, 1, 1, 0);
        damageTexture.color = damageColor;
        health   = 40.0f;
        playTime = 0.0f;
    }
コード例 #2
0
ファイル: Hero.cs プロジェクト: Jesse0Michael/LD29
    // Use this for initialization
    void Start()
    {
        arrowTran = transform.FindChild("heroarrow");
        bowTran = transform.FindChild("HeroArm");
        arrowSpawn = bowTran.FindChild("heroarm").FindChild("arrowSpawn");
        bowAnim = bowTran.GetComponent<Animator>();
        hand = bowTran.GetComponent ("HeroArm") as HeroArm;
        hand.HideHand();

        damageTexture = GameObject.Instantiate (textureType, new Vector3 (0, 0, 0), Quaternion.Euler (new Vector3 (0, 0, 0))) as GUITexture;
        damageColor = new Color (1,1,1,0);
        damageTexture.color = damageColor;
    }