Beispiel #1
0
        public override void OnEnter()
        {
            base.OnEnter();

            Debug.Log("Called allyping");

            MinionOwnership[] array;



            foreach (MinionOwnership.MinionGroup minionGroup in instancesList)
            {
                if (minionGroup.ownerId == base.characterBody.master.netId)
                {
                    if (AllyPing.GetMinionMembers(minionGroup, out array))
                    {
                        foreach (PlayerCharacterMasterController playerNetworkUser in PlayerCharacterMasterController.instances)
                        {
                            if (playerNetworkUser.netId == base.characterBody.master.netId)
                            {
                                PingerController pingerController = playerNetworkUser.GetComponent <PingerController>();
                                minions = array;
                                target  = pingerController.currentPing.targetGameObject;
                            }
                        }
                    }
                }
            }
        }
Beispiel #2
0
        public override void FixedUpdate()
        {
            currentTime += Time.deltaTime;

            if (minions == null)
            {
                base.OnExit();
                return;
            }

            for (int i = 0; i < minions.Length; i++)
            {
                AllyPing.SetMemberTarget(minions[i], target);
            }

            if (currentTime > 5)
            {
                currentTime = 0;
                base.OnExit();
            }

            base.FixedUpdate();
        }