Exemplo n.º 1
0
 private void BeamLevelUp(CharacterrCtrl characterr)
 {
     if (characterr.beamLevel < 3)
     {
         characterr.beamLevel += 1;
         Destroy(gameObject);
     }
 }
Exemplo n.º 2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag == "Character")
     {
         character = other.gameObject.GetComponent <CharacterrCtrl>();
         StartCoroutine(WarpToPoint());
     }
 }
Exemplo n.º 3
0
 private void HpRecovery(CharacterrCtrl characterr)
 {
     if (characterr.hp < 7)
     {
         characterr.hp = 7;
         Destroy(gameObject);
     }
 }
Exemplo n.º 4
0
 void Start()
 {
     master     = GameObject.FindGameObjectWithTag("Character").GetComponent <CharacterrCtrl>();
     blendCount = 100;
     if (canNotCollect == false)
     {
         SoundManager.PlayS(gameObject, "SE_Blocked");
         StartCoroutine(collect());
     }
 }
Exemplo n.º 5
0
    private void OnTriggerEnter(Collider other)
    {
        if (BombTime > 8 && other.gameObject.tag == "Character")
        {
            CharacterrCtrl character = other.gameObject.GetComponent <CharacterrCtrl>();
            if (character.invincible == false)
            {
                if (other.gameObject.GetComponent <PlayerPvECtrl>().RideOnTank == true)
                {
                    other.gameObject.GetComponent <PlayerPvECtrl>().Tank.GetComponent <Tank>().TankLife -= AttackDamage;
                    other.gameObject.GetComponent <PlayerPvECtrl>().tankLife();
                    SoundManager.PlayS(other.gameObject, "SE_Damage");
                    StartCoroutine(character.Invincible());
                }
                else
                {
                    SoundManager.PlayS(other.gameObject, "SE_Damage");
                    //character.hp -= AttackDamage;
                    StartCoroutine(character.Invincible());
                }
            }
        }
        else if (BombTime > 8 && other.gameObject.tag == "Block" || other.gameObject.tag == "SlowTrap")
        {
            if (TriggerEntered == false)
            {
                DestroyTime = 0.48f;
            }
            TriggerEntered = true;
            Destroy(other.gameObject);
        }

        /*if (other.gameObject.tag == "Attack" && isInvincible == false)
         * {
         *  if (other.gameObject.name == "Attack")//近接か遠距離かを判別
         *  {
         *      EnemyLife -= 5;
         *      StartCoroutine(Invicible());
         *      mesh.SetBlendShapeWeight(0, mesh.GetBlendShapeWeight(0) - (100 / MaxHP));
         *  }
         *  else
         *  {
         *      EnemyLife -= 30;
         *  }
         *
         *
         *  if (EnemyLife <= 0)//死亡
         *  {
         *      Instantiate(SystemCtrl.block, transform.position, Quaternion.identity);
         *      FXCtrl.FXLoad("BlockChange", transform.position);
         *      Destroy(gameObject);
         *  }*/
    }
Exemplo n.º 6
0
 private void OnCollisionEnter(Collision collision)
 {
     if (collision.gameObject.tag == "Character")//プレイヤーへの攻撃
     {
         //collision.gameObject.GetComponent<Rigidbody>().velocity = new Vector3(0, 0, 0);
         CharacterrCtrl character = collision.gameObject.GetComponent <CharacterrCtrl>();
         if (character.invincible == false)
         {
             if (collision.gameObject.GetComponent <PlayerPvECtrl>().RideOnTank == true)
             {
                 collision.gameObject.GetComponent <PlayerPvECtrl>().Tank.GetComponent <Tank>().TankLife -= AttackDamage;
                 collision.gameObject.GetComponent <PlayerPvECtrl>().tankLife();
                 SoundManager.PlayS(collision.gameObject, "SE_Damage");
                 StartCoroutine(character.Invincible());
                 StartCoroutine(Stan(2f));
             }
             else
             {
                 SoundManager.PlayS(collision.gameObject, "SE_Damage");
                 //character.hp -= AttackDamage;
                 StartCoroutine(character.Invincible());
                 direction = TargetPos - transform.position;
                 dis       = direction.magnitude;
                 direction = direction / dis;
                 collision.gameObject.GetComponent <Rigidbody>().velocity = new Vector3(direction.x * knockBackRange, 0, direction.z * knockBackRange);
                 StartCoroutine(Stan(2f));
             }
         }
     }
     else if (collision.gameObject.tag == "Block")//ブロックの破壊
     {
         HyperBlock hb = collision.gameObject.GetComponent <HyperBlock>();
         hb.blockLife--;
         hb.BlendShape();
         if (hb.canNotCollect == true && hb.blockLife <= 0)
         {
             Destroy(collision.gameObject);
         }
         if (isStartStan == true)
         {
             if (gw != null)
             {
                 gw.SummonCount++;
             }
             Destroy(this.gameObject);
         }
         rb.velocity = new Vector3(0, 0, 0);
         StartCoroutine(Stan(5f));
     }
 }
Exemplo n.º 7
0
 private void OnCollisionEnter(Collision collision)
 {
     if (collision.gameObject.tag == "Character" && mode == 0)//プレイヤーへの攻撃
     {
         //collision.gameObject.GetComponent<Rigidbody>().velocity = new Vector3(0, 0, 0);
         CharacterrCtrl character = collision.gameObject.GetComponent <CharacterrCtrl>();
         if (character.invincible == false)
         {
             if (collision.gameObject.GetComponent <PlayerPvECtrl>().RideOnTank == true)
             {
                 collision.gameObject.GetComponent <PlayerPvECtrl>().Tank.GetComponent <Tank>().TankLife -= AttackDamage;
                 collision.gameObject.GetComponent <PlayerPvECtrl>().tankLife();
                 if (character.gameObject.GetComponent <PlayerPvECtrl>().RideOnTank == true)
                 {
                     SoundManager.PlayS(collision.gameObject, "SE_Tank_Damage");
                 }
                 else
                 {
                     SoundManager.PlayS(collision.gameObject, "SE_Damage");
                 }
                 StartCoroutine(character.Invincible());
                 StartCoroutine(Stan(2f));
             }
             else
             {
                 //character.hp -= AttackDamage;
                 SoundManager.PlayS(collision.gameObject, "SE_Damage");
                 StartCoroutine(character.Invincible());
                 StartCoroutine(Stan(2f));
             }
         }
     }
     else if (collision.gameObject.tag == "Block" && isStaned == false)//ブロックの破壊
     {
         HyperBlock hb = collision.gameObject.GetComponent <HyperBlock>();
         hb.blockLife--;
         hb.BlendShape();
         StartCoroutine(Stan(5f));
         rb.velocity = -rb.velocity;
         if (hb.canNotCollect == true && hb.blockLife <= 0)
         {
             Destroy(collision.gameObject);
         }
     }
 }
Exemplo n.º 8
0
 // Start is called before the first frame update
 void Start()
 {
     characterr = GameObject.FindGameObjectWithTag("Character").GetComponent <CharacterrCtrl>();
     for (int i = 0; i < stops.Length; i++)
     {
         stops[i].SetActive(true);
     }
     //enemy1Col.enabled = false;
     //enemy2Col.enabled = false;
     msgWindow.SetActive(false);
     for (int i = 0; i < ganner1.Length; i++)
     {
         ganner1[i].tag = "Untagged";
     }
     for (int i = 0; i < ganner2.Length; i++)
     {
         ganner2[i].tag = "Untagged";
     }
     StartCoroutine(StartTutorial());
 }
Exemplo n.º 9
0
 // Start is called before the first frame update
 void Start()
 {
     characterr = GameObject.FindGameObjectWithTag("Character").GetComponent <CharacterrCtrl>();
 }
Exemplo n.º 10
0
 // Start is called before the first frame update
 private void Awake()
 {
     master = GameObject.FindGameObjectWithTag("Character").GetComponent <CharacterrCtrl>();
 }
Exemplo n.º 11
0
 // Start is called before the first frame update
 private void Awake()
 {
     playerCharacter = player.GetComponent <CharacterrCtrl>();
     isCameraReset   = false;
     anim            = playerCharacter.body.GetComponent <Animator>();
 }