Exemplo n.º 1
0
        void boxer_AttackReceived(Boxer receiver, BoxerAttackEventArgs eventArgs) {
            BoxerVisualsController boxerController = GetController(receiver);
            Thread boxerThread = GetThread(receiver);
            if (receiver.IsCastingAttack && boxerThread.ThreadState == ThreadState.WaitSleepJoin) {
                boxerThread.Interrupt();
            }
            if (receiver.IsKnockedDown) {
                boxerController.Knockdown(receiver);
                redBoxer.StopFighting();
                blueBoxer.StopFighting();
                Debug.Log(String.Format("Loser is {0}", receiver.BoxerColor));
            }
            else {
                boxerController.AttackReceived(receiver);
            }

        }
Exemplo n.º 2
0
 void boxer_AttackStarted(Boxer attacker, BoxerAttackEventArgs eventArgs) {
     BoxerVisualsController boxerController = GetController(attacker);
     boxerController.StartAttack(attacker, eventArgs.Attack);
 }