예제 #1
0
        public void PickupObject(string name)
        {
            int maxHp, maxMana;

            maxHp   = ai.GetPlayerInfo().Character.hp;
            maxMana = ai.GetPlayerInfo().Character.mana;

            WiccanRede.AI.Action action = new WiccanRede.AI.Action();
            action.hpGot       = maxHp / 4;
            action.manaDrain   = -maxMana / 4;
            action.name        = "StatsUpdate";
            action.time        = 1;
            action.probability = 100;

            WiccanRede.AI.ActionInfo info = new WiccanRede.AI.ActionInfo();
            info.action     = action;
            info.targetName = "Player";

            ai.AcceptPlayerAction(info);
        }
예제 #2
0
        public Fireball(String name, Device device, Vector3 position, Vector3 direction, WiccanRede.AI.ActionInfo infoAction, Game.GameLogic logic)
            : base(null, Matrix.Translation(position), null)
        {
            base.SetType(WiccanRede.Graphics.Scene.LightType.Point);

            this.actionInfo = infoAction;
            this.logic      = logic;
            this.direction  = Vector3.Normalize(direction) * 600f;
            this.position   = position;
            this.name       = name;

            if (fireballTexture == null)
            {
                fireballTexture = TextureLoader.FromFile(device, @"Resources/Textures/Fire.dds");
            }

            objects = Graphics.GraphicCore.GetCurrentSceneManager().GetObjectsOfType(Type.GetType("WiccanRede.Objects.Player"), false);

            fireParticle = new FireBallParticleSystem(device, fireballTexture);
        }