示例#1
0
    public void ChangeWalkableState(EHaxType Type)
    {
        m_Type   = Type;
        MoveCost = (int)m_Type;
        switch (m_Type)
        {
        case EHaxType.Free:
            IsWalkable = true;
            break;

        case EHaxType.Wall:
            IsWalkable = false;
            break;

        case EHaxType.Water:
            IsWalkable = true;
            break;

        case EHaxType.Mountain:
            IsWalkable = true;
            break;
        }

        if (m_Unit != null)
        {
            IsWalkable = false;
        }

        ChangeColor();
    }
示例#2
0
 public void ToggleChange(Toggle Toggle, EHaxType Type)
 {
     if (Toggle.isOn == true)
     {
         {
             for (int i = 0; i < m_Toggles.Length; i++)
             {
                 if (Toggle != m_Toggles[i])
                 {
                     m_Toggles[i].isOn = false;
                 }
                 m_HaxType = Type;
             }
         }
     }
 }