コード例 #1
0
ファイル: IACentipede.cs プロジェクト: usernameHed/Coopolde
 private void ResetIA()
 {
     state                = 0;
     isPasive             = true;
     isGettingAngry       = false;
     iaIsAttackingForward = false;
     timeGettingAngry.Reset();
     cuca.SetAttacking(false);
 }
コード例 #2
0
ファイル: TriggerIA.cs プロジェクト: usernameHed/Coopolde
    private void OnTriggerStay(Collider other)
    {
        if (other.gameObject.CompareTag(GameData.Layers.Entity.ToString()))
        {
            CentipedeController centi = other.gameObject.GetComponentInParent <CentipedeController>();
            if (centi)
            {
                /*
                 * if (mySelf)
                 *  mySelf.CentipedeInLamp(centi);
                 * if (me)
                 *  me.CentipedeInLamp(centi);
                 */
                if (centi.iaCentiped.IsPasiveAndReadyToGetAngry())
                {
                    centi.SetAttacking(true);
                    Debug.Log(centi.gameObject.name);
                }
                return;
                //lampManager.CentipedeInLamp(centi);
            }
            RedEyes redEye = other.gameObject.GetComponentInParent <RedEyes>();
            if (redEye && killEye)
            {
                redEye.TryToKill();
                return;
            }

            /*
             * SpawnRedEyes spawn = other.gameObject.GetComponentInParent<SpawnRedEyes>();
             * if (spawn)
             * {
             *  spawn.Kill();
             * }
             */
        }
    }