Exemplo n.º 1
0
 public void Enemy_Anime(bool isBattle, Common.Type type)//敵にもAction増えたら追加 , Common.Action action) //多分IDは基本的にtouchID
 {
     if (isBattle)
     {
         Battle_enemy.GetComponent <Animator>().SetBool("Battle_start", true);
         Battle_enemy.GetComponent <Animator>().SetInteger("EnemyInt", (int)type);
         //Battle_enemy.GetComponent<Animator>().SetInteger("Move_Int", (int)action);
     }
     else
     {
         Battle_enemy.GetComponent <Animator>().SetBool("Battle_start", false);
         Battle_enemy.GetComponent <Animator>().SetTrigger("BattleEndTrigger");
         Battle_enemy.GetComponent <Animator>().SetInteger("EnemyInt", 0);
     }
 }
Exemplo n.º 2
0
 public Character(GameObject Image_obj, Common.Type t)
 {
     obj  = Image_obj;
     act  = Common.Action.Walk;
     type = t;
     map  = Instantiate(Resources.Load <GameObject>("Prefab/Icon")) as GameObject;
     map.transform.parent = GameObject.Find("Map_base").transform;
     if (t != Common.Type.Player)
     {
         Set_Chara((int)t);
         //obj.GetComponent<SpriteRenderer>().sprite = Resources.Load<Sprite>("Images/Charactor/Enemy_sprite/Enemy" + (int)t+"_1");
         map.GetComponent <Image>().sprite = Resources.Load <Sprite>("Images/GameScene/Small_enemy");
     }
     speed = 1;
     count = 0;
 }
Exemplo n.º 3
0
 public void Revival(Common.Type t)
 {
     type = t;
     obj.GetComponent <Animator>().SetInteger("Chara_Int", -1);
     obj.GetComponent <Animator>().SetBool("Out_Bool", true);
 }