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; }
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); }
void HideItems(E_CommandID activeCommandId) { if (m_State != E_State.Visible) { return; } m_State = E_State.Hidding; Owner.StartCoroutine(HideItems_Coroutine(activeCommandId)); }
// ------- 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); }
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); }
public static void ReportTeamCmd(uLink.NetworkPlayer player, E_CommandID id, uLink.NetworkMessageInfo info) { }
void OnSendCommand(E_CommandID id) { LocalPlayer.Controls.SendCommandDelegate(id); }
// ----- public void SetCommand(E_CommandID commandID) { m_Command = commandID; m_Changed = true; ApplyTeamCommand(); }