Exemple #1
0
 private void ChangeEditStatus(bool value)
 {
     IsSceneEditing = value;
     Debug.Log(IsSceneEditing ? $"开始编辑" : "结束编辑");
     if (IsSceneEditing)
     {
         myScript.Init();
         myScript.DrawAllBlocks(true);
     }
     else
     {
         myScript.ClearAllBlocks();
     }
 }
Exemple #2
0
 //先清空所有战斗格子
 //如果该位置可以战斗,则设置当前战斗盒子
 //初始化当前战斗盒子
 //生成所有战斗格子(默认为inactive)
 public bool EnterBattle(Vector3 pos)
 {
     ClearAllBlocks();
     foreach (var box in _boxList)
     {
         if (box.ColliderContain(pos))
         {
             Debug.Log($"找到了战斗盒子,玩家坐标:{pos.x}:{pos.y}:{pos.z}");
             _currentBattlebox = box;
             _currentBattlebox.Init();
             _currentBattlebox.DrawAreaBlocks(pos, m_MoveZoneDrawRange);
             return(true);
         }
     }
     return(false);
 }