コード例 #1
0
ファイル: HexTile.cs プロジェクト: mengtest/MOBAGame
    // Use this for initialization
    public void Start()
    {
        navMapManager = HexNavMapManager.GetInstance();
        GameObject weight = GameObject.Find("HexNavMap");

        heroWeight = weight.GetComponent <Weight> ();
        StartCoroutine(SetAllValue());          //给每个网格的WeightValue赋值
    }
コード例 #2
0
 // Update is called once per frame
 void Update()
 {
     hexNav     = HexNavMapManager.GetInstance();
     heroObject = GameObject.Find(hexNav.indexSelectedTile.ToString());
     if (heroObject != null)
     {
         heroHex = heroObject.GetComponent <HexTile> ();
     }
     if (heroHex.unit != null)
     {
         hero = heroHex.unit.GetComponent <Hero>();
     }
 }
コード例 #3
0
    // Use this for initialization
    void Start()
    {
        //设置屏幕自动旋转, 并置支持的方向
        Screen.orientation = ScreenOrientation.Portrait;
        Screen.autorotateToLandscapeLeft      = false;
        Screen.autorotateToLandscapeRight     = false;
        Screen.autorotateToPortrait           = true;
        Screen.autorotateToPortraitUpsideDown = false;


        hexNavMapManager = HexNavMapManager.GetInstance();

        if (hexNavMapManager)
        {
            DeployHero();             //部署英雄,敌人,道具

            DeployEnemy();            //部署英雄,敌人,道具

            DeployProp();             //部署英雄,敌人,道具
        }
    }
コード例 #4
0
ファイル: TouchDebug.cs プロジェクト: mengtest/MOBAGame
 // Use this for initialization
 void Start()
 {
     navMapManager = HexNavMapManager.GetInstance();
 }