コード例 #1
0
//:::::::::::::::::::::::::::: Hiden functions ::::::::::::::::::::::::::::::::::::::::
    protected override void Start()
    {
        HiveMind.imaGoodGuy(this);
        //instantiate weapons
        for (int i = 0; i < 4; i++)
        {
            if (weaponPrefabs [i] != null)
            {
                weaponsGameO [i] = Instantiate(weaponPrefabs [i], hand1.transform);
            }
        }
        //Dissable unused weapons
        for (int i = 1; i < 4; i++)
        {
            if (weaponsGameO [i] != null)
            {
                weaponsGameO [i].SetActive(false);
            }
        }
        // Weapon inisialization
        for (int i = 0; i < 4; i++)
        {
            if (weaponsGameO [i] != null)
            {
                weaponlist [i] = weaponsGameO [i].GetComponent <Weapon> ();
            }
        }
        //get animator
        animator = this.GetComponent <Animator> ();
        base.Start();
    }
コード例 #2
0
 //:::::::::::::::::::::::::::: Hiden functions ::::::::::::::::::::::::::::::::::::::::
 void Start()
 {
     if (imGood)
     {
         HiveMind.imaGoodGuy(this);
     }
     else
     {
         HiveMind.imaBadGuy(this);
     }
 }
コード例 #3
0
 //:::::::::::::::::::::::::::: Hiden functions ::::::::::::::::::::::::::::::::::::::::
 void Start()
 {
     if (imGood)
     {
         HiveMind.imaGoodGuy(this);
     }
     else
     {
         HiveMind.imaBadGuy(this);
     }
     sphere = this.gameObject.GetComponent <CharacterController> ();
     //squaring distances
     close = close * close;
 }
コード例 #4
0
 protected override void Start()
 {
     if (amIgood)
     {
         HiveMind.imaGoodGuy(this);
     }
     else
     {
         HiveMind.imaBadGuy(this);
     }
     atackRange    = atackRange * atackRange;
     sightDistance = sightDistance * sightDistance;
     InvokeRepeating("updateState", Random.value, 0.7f);
     objectivePosition = this.transform.position;
     base.Start();
 }
コード例 #5
0
ファイル: Dumy.cs プロジェクト: Kibelon/GladiatorShow
//:::::::::::::::::::::::::::: Hiden functions ::::::::::::::::::::::::::::::::::::::::
    override protected void Start()
    {
        if (imGood)
        {
            HiveMind.imaGoodGuy(this);
        }
        else
        {
            HiveMind.imaBadGuy(this);
        }
        //squaring distances
        close     = close * close;
        sqInRange = inRange * inRange;

        base.Start();
    }
コード例 #6
0
    //:::::::::::::::::::::::::::: Hiden functions ::::::::::::::::::::::::::::::::::::::::
    override protected void Start()
    {
        animator = this.gameObject.GetComponent <Animator> ();
        if (imGood)
        {
            HiveMind.imaGoodGuy(this);
        }
        else
        {
            HiveMind.imaBadGuy(this);
        }
        //squaring distances
        close     = close * close;
        sqInRange = inRange * inRange;
        engage    = engage * engage;

        // Laser inisialization
        for (int i = 0; i < 3; i++)
        {
            lasers [i] = lasersGO [i].GetComponent <Weapon> ();
        }

        base.Start();
    }