Exemplo n.º 1
0
 public void IncrementEnd()
 {
     lock (lockObj)
     {
         end++;
     }
     KillLogMgr.Notify();
 }
Exemplo n.º 2
0
 public void AddLog(Tuple <string, string> log)
 {
     lock (lockObj)
     {
         end++;
         killLogs.Add(log);
         called.Add(false);
     }
     KillLogMgr.Notify();
 }
Exemplo n.º 3
0
 public void AddLog(string from, string to)
 {
     lock (lockObj)
     {
         end++;
         killLogs.Add(new Tuple <string, string>(from, to));
         called.Add(false);
     }
     KillLogMgr.Notify();
 }
Exemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     rb = GetComponent <Rigidbody>();
     gm = GameManager.instance;
     if (gm != null)
     {
         myContext  = gm.MyContext;
         killLogMgr = gm.KillLogMgr;
     }
     healthText = transform.GetChild(1).GetChild(0).GetComponent <Text>();
 }
Exemplo n.º 5
0
 public void IncrementStart()
 {
     lock (lockObj)
     {
         if (start < end)
         {
             start++;
             Debug.Log(start);
             KillLogMgr.Notify();
         }
     }
 }
Exemplo n.º 6
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(this.gameObject);
     }
     _packetManager = GameObject.Find(ElementStrings.PACKETMANAGER).GetComponent <PacketManager>();
     _packetManager.SetHandleMessage(PopMessage);
     killLogMgr = GetComponent <KillLogMgr>();
     DontDestroyOnLoad(this.gameObject);
 }