コード例 #1
0
        public static void NewAbilityDrop(int abilityType, Vector2 position, Vector2 velocity, int lifeTime = 12)
        {
            AbilityDrop newinstance = new AbilityDrop();

            newinstance.BuildColorsArray();
            newinstance.texture     = abilityTextures[abilityType];
            newinstance.rectColor   = newinstance.colorsArray[abilityType];
            newinstance.position    = position;
            newinstance.velocity    = velocity;
            newinstance.hitbox      = new Rectangle((int)position.X, (int)position.Y, newinstance.texture.Width, newinstance.texture.Height);
            newinstance.lifeTimer   = lifeTime;
            newinstance.abilityType = abilityType;
            Main.activeEntities.Add(newinstance);
        }
コード例 #2
0
 public void DestoryInstance(AbilityDrop abilityDrop)
 {
     Main.activeEntities.Remove(abilityDrop);
 }