Пример #1
0
 // Start is called before the first frame update
 void Start()
 {
     enemyMain = GetComponent <Enemy>();
     egg       = GameObject.FindGameObjectWithTag("Egg").GetComponent <EggCtrl>();
     preStatus = nowStatus;
     GetComponent <CriAtomSource>().Play("Voice_yuushaToujou");
 }
Пример #2
0
 // Start is called before the first frame update
 void Start()
 {
     egg       = GameObject.FindGameObjectWithTag("Egg").GetComponent <EggCtrl>();
     gameStart = true;
     canCtrl   = true;
     nowTime   = totalTime;
     GetComponent <CriAtomSource>().Play("BGM_Play");
 }
Пример #3
0
 // Start is called before the first frame update
 void Start()
 {
     attackInterval = 3;
     enemy          = GetComponent <AttackOnEnemy>();
     agent          = GetComponent <NavMeshAgent>();
     egg            = GameObject.FindGameObjectWithTag("Egg").GetComponent <EggCtrl>();
     startPos       = transform.position;
     if (GetComponent <Rigidbody>() != null)
     {
         Destroy(GetComponent <Rigidbody>());
     }
 }
Пример #4
0
 // Start is called before the first frame update
 void Start()
 {
     enemy = GetComponent <AttackOnEnemy>();
     agent = GetComponent <NavMeshAgent>();
     egg   = GameObject.FindGameObjectWithTag("Egg").GetComponent <EggCtrl>();
     if (GetComponent <Rigidbody>() == null)
     {
         gameObject.AddComponent <Rigidbody>();
     }
     rb = GetComponent <Rigidbody>();
     rb.freezeRotation = true;
 }
Пример #5
0
    public void Delivery()
    {
        if (canDelivery == false || isDown == true || isDush == true)
        {
            return;
        }
        EggCtrl egg = GameObject.FindGameObjectWithTag("Egg").GetComponent <EggCtrl>();

        egg.Delivery(collected.Cow, collected.Bird, collected.Fish, collected.Human);
        animator.SetTrigger("Throw");
        GetComponent <CriAtomSource>().Play("SE_sasageru");
        GetComponent <CriAtomSource>().Play("Voice_shinjaOosamekudasai");
        GameObject sasageru = Instantiate(ResourcesCtrl.sasageru, new Vector3(egg.transform.position.x, 10f, egg.transform.position.z), Quaternion.Euler(90, 0, 90));

        collected.Reste();
    }