Пример #1
0
 public void OnDestroy()
 {
     if (AIThread != null)
     {
         AI_Params.PushEvent(EEventType.EventTypeGameEnd);
         AI_Params.Send(Time.time);
         AIThread.Join(); // Waiting for the AI thread to finish saving
         AIThread = null;
     }
     InstanceCount--;
 }
Пример #2
0
    public void Update()
    {
        AI_Params.PushCharacter(AI_Params.PlayerID, ECharacterType.CharacterTypePlayer, Vector3.zero, Vector3.zero, Vector3.zero, true);
        //AI_Params.PushEvent(EEventType.EventTypeActionStarted, AI_Params.PlayerID, AI_Params.UnknownID, EActionCode.ActionCodeAttackLight);
        //if (Time.time > 2.0) AI_Params.PushEvent(EEventType.EventTypeGameEnd);
        AI_Params.Send(Time.time);
        AI_Order order = AI_Orders.GetOrderForCharacter(AI_Params.PlayerID);

        if (order != null)
        {
            Debug.Log("[Game] Order received (id: " + order.CharacterID + ", code: " + order.ActionCode + ").");
        }
    }