Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        //マウスポジションの取得
        GameManeger = GameObject.Find("GameManeger");
        Mouse       = GameManeger.GetComponent <Mouse_Operation>();
        // Astar初期化
        RouteManager.Instance.Initialize(tileSize);
        /////////////////////////////////////
        /*////////GameObjectFind///////////*/
        /////////////////////////////////////
        player       = GameObject.Find("Char");
        Tansu        = GameObject.Find("NewWallManager");
        deathTileMap = GameObject.Find("DeathTileMap");
        Touch        = Tansu.GetComponent <touch>();
        anim         = player.GetComponent <Animator>();



        ///////////////////////////////////////
        /*//////////TileMapFind/////////////*/
        /////////////////////////////////////
        tilemap = GetComponent <Tilemap>();
        Death   = deathTileMap.GetComponent <Tilemap>();


        //当たり判定の初期化
        InitSetLock(tilemap);
        DeathTileMap(Death);

        _startNodeId.x = (int)player.transform.position.x;
        _startNodeId.y = (int)player.transform.position.y - 1;

        //最短経路の計算
        RouteManager.Instance.SearchRoute(_startNodeId, goalNodeId, _routeList, tilemap);
    }
Пример #2
0
 // Start is called before the first frame update
 void Start()
 {
     anim         = GameObject.Find("Tansu").GetComponent <Animator>();
     clockAnim    = GameObject.Find("Clock").GetComponent <Animator>();
     pianoAnim    = GameObject.Find("Piano").GetComponent <Animator>();
     GameManeger  = GameObject.Find("GameManeger");
     Mouse        = GameManeger.GetComponent <Mouse_Operation>();
     playertouch  = GameObject.Find("Char");
     TansuPos     = GameObject.Find("TansuSet").transform.position;
     TansuTatePos = GameObject.Find("TansuTateSet").transform.position;
     ClockPos     = GameObject.Find("ClockPos").transform.position;
 }
Пример #3
0
    // Start is called before the first frame update
    void Start()
    {
        GameManeger = GameObject.Find("GameManeger");

        MousePos = GameManeger.GetComponent <Mouse_Operation>();
    }