Пример #1
0
    IEnumerator HideItems_Coroutine(E_CommandID activeCommandId)
    {
        if (m_Menu != null)
        {
            m_Menu.ForceHighlight(false);
        }

        for (int idx = 0; idx < (int)E_CommandID.Max; ++idx)
        {
            if (idx != (int)activeCommandId)
            {
                m_Items[idx].Show(false, true);
                SetState(m_Items[idx], IDLE);
            }
            else
            {
                SetState(m_Items[idx], HOVER);
            }
        }

        if (activeCommandId != E_CommandID.Max)
        {
            yield return(new WaitForSeconds(1.0f));

            int idx = (int)activeCommandId;
            m_Items[idx].Show(false, true);
            SetState(m_Items[idx], IDLE);
        }

        m_State = E_State.Idle;
    }
Пример #2
0
    void ActionCommand(E_CommandID id)
    {
        //TODO: do something clever here...
        AgentActionTeamCommand a = AgentActionFactory.Create(AgentActionFactory.E_Type.TeamCommand) as AgentActionTeamCommand;

        a.Command = id;

        Owner.BlackBoard.ActionAdd(a);
    }
Пример #3
0
    void HideItems(E_CommandID activeCommandId)
    {
        if (m_State != E_State.Visible)
        {
            return;
        }
        m_State = E_State.Hidding;

        Owner.StartCoroutine(HideItems_Coroutine(activeCommandId));
    }
Пример #4
0
 // -------
 public void StartTeamCommand(AgentHuman agent, E_CommandID teamCommand)
 {
     foreach (RadarFriend friend in RadarFriends)
     {
         if (friend.m_Agent == agent)
         {
             friend.SetCommand(teamCommand);
             break;
         }
     }
     //Debug.Log("Cmd start "+agent+"   "+teamCommand);
 }
Пример #5
0
    protected void TeamCmd(E_CommandID id, uLink.NetworkMessageInfo info)
    {
#if !DEADZONE_CLIENT
        if (Owner.IsServer)
        {
            ServerAnticheat.ReportTeamCmd(Owner.NetworkView.owner, id, info);

            Owner.NetworkView.RPC("TeamCmd", uLink.RPCMode.OthersExceptOwner, id);
            return;
        }
#endif

        AgentActionTeamCommand a = AgentActionFactory.Create(AgentActionFactory.E_Type.TeamCommand) as AgentActionTeamCommand;
        a.Command = id;

        Owner.BlackBoard.ActionAdd(a);
    }
Пример #6
0
 public static void ReportTeamCmd(uLink.NetworkPlayer player, E_CommandID id, uLink.NetworkMessageInfo info)
 {
 }
Пример #7
0
 void OnSendCommand(E_CommandID id)
 {
     LocalPlayer.Controls.SendCommandDelegate(id);
 }
Пример #8
0
 // -----
 public void SetCommand(E_CommandID commandID)
 {
     m_Command = commandID;
     m_Changed = true;
     ApplyTeamCommand();
 }