//-----------------------------------------------------------------------------
        // Constructor
        //-----------------------------------------------------------------------------
        public MonsterZolGreen()
        {
            color			= MonsterColor.Green;
            MaxHealth		= 1;
            ContactDamage	= 1;

            moveSpeed		= 0.75f;
            jumpSpeed		= new RangeF(2.0f);
            stopTime		= new RangeI(48);
            stopAnimation	= GameData.ANIM_MONSTER_ZOL;
            jumpAnimation	= GameData.ANIM_MONSTER_ZOL_JUMP;
        }
示例#2
0
        //-----------------------------------------------------------------------------
        // Constructor
        //-----------------------------------------------------------------------------
        public JumpMonster()
        {
            color			= MonsterColor.Red;
            MaxHealth		= 1;
            ContactDamage	= 1;

            moveSpeed		= 1.0f;
            stopTime		= new RangeI(30, 60);
            jumpSpeed		= new RangeF(3, 3);
            stopAnimation	= GameData.ANIM_MONSTER_ZOL;
            jumpAnimation	= GameData.ANIM_MONSTER_ZOL_JUMP;

            syncAnimationWithDirection = false;
        }
示例#3
0
 // Constructs a copy of the specified range.
 public RangeF(RangeF r)
 {
     this.Min	= r.Min;
     this.Max	= r.Max;
 }
示例#4
0
 //-----------------------------------------------------------------------------
 // Accessors
 //-----------------------------------------------------------------------------
 public bool Intersects(RangeF other)
 {
     return (Max > other.Min && Min < other.Max);
 }
示例#5
0
 /** <summary> Returns a random double within the specified range. </summary> */
 public static double NextDouble(RangeF range)
 {
     return(range.Min + random.NextDouble() * (range.Max - range.Min));
 }
示例#6
0
 /** <summary> Returns a random double within the specified range. </summary> */
 public static double NextDouble(RangeF range)
 {
     return range.Min + random.NextDouble() * (range.Max - range.Min);
 }
示例#7
0
 // Constructs a copy of the specified range.
 public RangeF(RangeF r)
 {
     this.Min = r.Min;
     this.Max = r.Max;
 }
示例#8
0
        //-----------------------------------------------------------------------------
        // Accessors
        //-----------------------------------------------------------------------------

        public bool Intersects(RangeF other)
        {
            return(Max > other.Min && Min < other.Max);
        }