コード例 #1
0
    private IEnumerator rightleg()
    {
        move = GameObject.Find("ant").GetComponent <AntMove>();

        float z = 0.03f;

        while (z > 0)
        {
            if ((move.btn[2, 0] == 1 && move.pre_move >= 0) && (move.btn[0, 1] == 1 || move.btn[1, 1] == 1 || move.btn[4, 1] == 1 || move.btn[5, 1] == 1))
            {
                if (Input.GetKeyDown(KeyCode.J))
                {
                    transform.localScale = new Vector3(4.0f, 60, 2.5f);
                }
            }

            else if ((move.btn[3, 0] == 1 && move.pre_move <= 0) && (move.btn[0, 1] == 1 || move.btn[1, 1] == 1 || move.btn[4, 1] == 1 || move.btn[5, 1] == 1))
            {
                if (Input.GetKeyDown(KeyCode.D))
                {
                    transform.localScale = new Vector3(2.5f, 60, 2.5f);
                }
            }
            else
            {
                transform.localScale = new Vector3(2.5f, 60, 2.5f);
            }



            z -= Time.deltaTime;
            yield return(null);
        }
    }
コード例 #2
0
 void Start()
 {
     Tutorial13.SetActive(false);
     antmove = GameObject.Find("ant").GetComponent <AntMove>();
     tu2     = gameObject.GetComponent <Tu2Move>();
     tu48    = gameObject.GetComponent <Tu48Move>();
 }
コード例 #3
0
 void Start()
 {
     Ant     = GameObject.Find("ant");
     Antmove = Ant.GetComponent <AntMove>();
     King    = GameObject.Find("KingImage");
     tr      = Ant.GetComponent <Transform>();
 }
コード例 #4
0
    void Awake()
    {
        SpacePopup  = GameObject.Find("SpaceImage");
        SpacePopup2 = GameObject.Find("SpaceImage2");
        BreadPopup  = GameObject.Find("BreadPickup");
        BreadPopup2 = GameObject.Find("BreadPickup2");
        SpinAnt     = GameObject.Find("SpinAntImage");
        SpinAnt2    = GameObject.Find("SpinAntImage2");
        ant         = GameObject.Find("ant");
        antmove     = ant.GetComponent <AntMove>();
        player      = ant.GetComponent <Player>();

        ///////////
        startpopup = GameObject.Find("startpopup");
        timer      = GameObject.Find("Timer");
    }
コード例 #5
0
 void Awake()
 {
     antmove = GameObject.Find("ant").GetComponent <AntMove>();
 }
コード例 #6
0
 // Start is called before the first frame update
 void Start()
 {
     Move      = gameObject.GetComponent <AntMove>();
     Hunger    = gameObject.GetComponent <AntHunger>();
     Pheromone = gameObject.GetComponent <AntPheromone>();
 }
コード例 #7
0
 void Awake()
 {
     ht      = GameObject.Find("SpaceImage2");
     ant     = GameObject.Find("ant");
     antmove = ant.GetComponent <AntMove>();
 }
コード例 #8
0
 void Start()
 {
     Ant = GameObject.Find("ant").GetComponent <AntMove>();
     this.gameObject.transform.eulerAngles = new Vector3(0.0f, 0.0f, 0.0f);
     //StartCoroutine(DestroySelf());
 }
コード例 #9
0
 // Start is called before the first frame update
 void Start()
 {
     Tutorial57.SetActive(false);
     antmove = GameObject.Find("ant").GetComponent <AntMove>();
     tu13    = gameObject.GetComponent <Tu13Move>();
 }
コード例 #10
0
ファイル: Player.cs プロジェクト: thfla1105/Ant-Bread-Project
    Vector3 vec; //식빵의 로컬위치

    void Awake()
    {
        antmove = GameObject.Find("ant").GetComponent <AntMove>();
        pos     = antmove.transform.position;
    }
コード例 #11
0
ファイル: AntMove.cs プロジェクト: YgritteSnow/BugAndPath
 private void Awake()
 {
     _instance = this;
     L         = new LuaState();
 }