Ejemplo n.º 1
0
        protected override void Activate()
        {
            this._status = Status.Active;

            Bio bio = ( Bio )this.owner;

            if (bio.fsm.currState.type == FSMStateType.Idle)
            {
                if (bio.property.team == 0)
                {
                    bio.Move(bio.battle.basePoint2);
                }
                else if (bio.property.team == 1)
                {
                    bio.Move(bio.battle.basePoint1);
                }
            }
        }
Ejemplo n.º 2
0
        public void HandleMove(string id, Vec3 targetPoint)
        {
            Bio bio = this.GetBio(id);

            if (bio == null)
            {
                return;
            }

            if (!bio.CanMove())
            {
                return;
            }

            bio.Move(targetPoint);
        }
Ejemplo n.º 3
0
        protected override void Activate()
        {
            this._status = Status.Active;

            Vec3 dir   = Vec3.zero;
            int  count = this._threatenings.Count;

            for (int i = 0; i < count; i++)
            {
                Bio threatening = this._threatenings[i];
                dir += this.owner.property.position - threatening.property.position;
            }
            dir.Normalize();

            Vec3 homeDir = Vec3.Normalize(this.owner.bornPosition - this.owner.property.position);

            dir = Vec3.Normalize(dir * 1.4f + homeDir);
            this._targetPoint = this.owner.property.position + dir * 5f;

            Bio bio = ( Bio )this.owner;

            bio.Move(this._targetPoint);
        }