예제 #1
0
        public void PrepareBattle(ArenaManager subject)
        {
            OnBlockEvent?.Invoke(actionBlocks);

            switch (GetComponent <GroupFinder>().Group.ThisGroupName)
            {
            case GroupManager.Group.GroupAzure:
                StartCoroutine(ScriptedMovement(subject.Group0StartPosition.position, subject));
                break;

            case GroupManager.Group.GroupPink:
                StartCoroutine(ScriptedMovement(subject.Group1StartPosition.position, subject));
                break;

            case GroupManager.Group.GroupGreen:
                StartCoroutine(ScriptedMovement(subject.Group2StartPosition.position, subject));
                break;

            case GroupManager.Group.GroupYellow:
                StartCoroutine(ScriptedMovement(subject.Group3StartPosition.position, subject));
                break;

            case GroupManager.Group.All:
                break;

            case GroupManager.Group.None:
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
예제 #2
0
        private void StartKnockback(Attack attack, CombatSystem attackerCombatSystem)
        {
            if (_knockbackCr != null)
            {
                return;
            }

            _knockbackCr = StartCoroutine(KnockbackCoroutine(attack, attackerCombatSystem));

            OnStartKnockback?.Invoke();
            OnBlockEvent?.Invoke(actionBlocks);
        }
예제 #3
0
        private void StartStun(float stunTime)
        {
            if (_stunCoroutine != null)
            {
                return;
            }

            _stunCoroutine = StartCoroutine(StunCoroutine(stunTime));

            OnStartStun?.Invoke();
            OnBlockEvent?.Invoke(actionBlocks);

            //Debug.Log("Start stun " + transform.root.name);
        }
예제 #4
0
        private void StartDash()
        {
            if (_moveDirection.magnitude <= 0.1f)
            {
                return;
            }
            if (!_cooldowns.TryAbility(this))
            {
                return;
            }

            _dashCoroutine = StartCoroutine(DashCoroutine());

            OnBlockEvent?.Invoke(actionBlocks);
            OnStartDash?.Invoke();
        }
예제 #5
0
 public async void AddBlockByNumber(HexBigInteger blockNumber, Web3 web3)
 {
     await Task.Run(() =>
     {
         Block newBlock = null;
         while (newBlock == null)
         {
             try { newBlock = new Block(blockNumber, web3); } catch { }
         }
         lock (_Blocks)
         {
             _Blocks.Insert(0, newBlock);
             _Blocks.Sort((x, y) => y.Number.CompareTo(x.Number));
             var lastBlockNum = _Blocks.Max(b => b.Number) - _RecentBlocks;
             _Blocks.RemoveAll(b => b.Number <= lastBlockNum);
         }
         OnBlockEvent?.Invoke(this, new Block.BlockEventArgs(newBlock, MonitorAddress));
     });
 }
예제 #6
0
        private void TryCallToArms()
        {
            if (!_impMana.CheckSegments(manaSegmentsCost))
            {
                return;
            }
            if (_callToArmsCr != null)
            {
                return;
            }
            if (_currentArena == null)
            {
                return;
            }

            _callToArmsCr = StartCoroutine(CallToArms());

            OnCallToArmsStart?.Invoke();
            OnBlockEvent?.Invoke(actionBlocks);
            OnAggroActionDone?.Invoke(onActionAggro);
        }
        public void PrepareBattle(ArenaManager subject)
        {
            OnBlockEvent?.Invoke(actionBlocks);

            StartCoroutine(ScriptedMovement(subject.PlayerStartPosition.position, subject));
        }
예제 #8
0
 public void StartAbility(GroupAbility ability) => OnBlockEvent?.Invoke(ability.GetData().ActionBlocks);