»Ë»Ñ Æ÷·³
°³¹ßÀÚÆ÷·³ ÀÔ´Ï´Ù.
  • ºÏ¸¶Å© ¾ÆÀÌÄÜ

Àû ij¸¯ÅÍ ¿øÇÏ´Â ¹üÀ§¾È¿¡¼­ ¿Ô´Ù°¬´Ù Áú¹®ÇÕ´Ï´Ù.1

  • ºí·¢¿£Á©¡Ú
  • µî·ÏÀÏ 2015-08-19 15:18
  • Á¶È¸¼ö 383
¸ÕÀú ¼Ò½º ÀÔ´Ï´Ù.

using UnityEngine;
using System.Collections;

public class Enemy : MonoBehaviour {

         public float _speed = 0.3f;
public int a =0;
public enum movement
{ up, down, left, right } // 0,1,2,3
  public int move; // »óÇÏÁ¿ì Áß ÇϳªÀÇ °ªÀ» °¡Áú moveº¯¼ö
  
// Use this for initialization
void Start () {
}

// Update is called once per frame
void Update () {
  {
  
if(a==0){
  move = 0;}
if(a==1){
  move = 1;}
if(a==2){
  move = 2;}
if(a==3){
  move = 3;}

   _moveOnmap();
     switch(a){
   case 0:
    transform.Translate(_speed*Time.deltaTime*Vector3.left);
    break;

   case 1:
    transform.Translate(_speed * Time.deltaTime * Vector3.right);

    break;
              
   case 2:
    transform.Translate(_speed*Time.deltaTime*Vector3.forward);
    break;

   case 3 :
    transform.Translate(_speed*Time.deltaTime*Vector3.back);
    break;
   }

  }
}
void _moveOnmap()
{
  //float _deltaPosY = Random.Range(0,Screen.height);
// float _deltaPosX = Random.Range(0,Screen.width);

}


}

ÀÌ·¸°Ô Çϸé 0~3¹ø¿¡¼­ ¼ýÀÚ¸¦ ³ÖÀ¸¸é ¿øÇÏ´Â ¹æÇâÀ¸·Î ¿òÁ÷À̴µ¥¿ä..

¿©±â¼­ ¿øÇÏ´Â À§Ä¡¿¡ °¬´Ù°¡ ´Ù½Ã µ¹¾Æ¿À´Â°É ¹Ýº¹ ÇÏ°í ½ÍÀºµ¥...

¾î¶»°Ô ÇÏ¸é µÉ±î¿ä??

óÀ½¿¡´Â ·£´ý ÇÔ¼ö¸¦ ½áº¼±î ÇÏ´Ù°¡ À߾ȵǼ­ ÀÌ·¸°Ô Çß½À´Ï´Ù.

0
ÃßõÇϱ⠴ٸ¥ÀÇ°ß 0
|
°øÀ¯¹öÆ°

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 RTAI
  • ¾Ë¸² ¿å¼³, »óó ÁÙ ¼ö ÀÖ´Â ¾ÇÇÃÀº »ï°¡ÁÖ¼¼¿ä.
©¹æ »çÁø  
¡â ÀÌÀü±Û¡ä ´ÙÀ½±Û