Example #1
0
    // Use this for initialization
    void Start()
    {
        if(findEnemy == null)
            findEnemy = GameObject.Find (itemConst.Finder).GetComponent<FindEnemy>();

        if(charaCont == null)
            charaCont = GameObject.Find (itemConst.player).GetComponent<PlayerControll> ();

        bulletDefaultPosition = GameObject.Find (itemConst.playerRightHand).transform.position;
        GetEnemyAndShooting ();
        Destroy (this.gameObject, 1);
    }
Example #2
0
    // Use this for initialization
    void Start()
    {
        if(findEnemy == null)
            findEnemy = GameObject.Find (itemConst.Finder).GetComponent<FindEnemy>();

        if(charaCont == null)
            charaCont = GameObject.Find (itemConst.player).GetComponent<PlayerControll> ();

        if (Effect == null)
            Effect = this.transform.FindChild ("Effect").gameObject;

        GetEnemyAndShootingInit ();
    }
Example #3
0
 // Start is called before the first frame update
 void Start()
 {
     FindEnemySc = GameObject.Find("Find_Enemy").GetComponent <FindEnemy>();
     fMonsterHp  = 100.0f;
 }