示例#1
0
        ModelEntity InitiateLetter(int letter)
        {
            ModelEntity letterModel = new ModelEntity(Game, TheCamera, WordXNAModels[letter]);

            letterModel.Moveable   = false;
            letterModel.ModelScale = new Vector3(Scale);
            letterModel.PO.AddAsChildOf(this);

            return(letterModel);
        }
示例#2
0
        ModelEntity InitiateNumber(int number)
        {
            if (number < 0)
            {
                number = 0;
            }

            ModelEntity digit = new ModelEntity(Game, TheCamera, NumberModels[number]);

            digit.Moveable   = false;
            digit.ModelScale = new Vector3(Scale);
            digit.PO.AddAsChildOf(this);

            return(digit);
        }
示例#3
0
        ModelEntity DidEntityCollide(ModelEntity otherEntity)
        {
            foreach (ModelEntity block in TheBlocks)
            {
                if (block.Enabled)
                {
                    if (block.Sphere.Intersects(otherEntity.Sphere))
                    {
                        return(block);
                    }
                }
            }

            return(null);
        }
示例#4
0
        public bool CheckColusion(ModelEntity otherEntity)
        {
            ModelEntity block = DidEntityCollide(otherEntity);

            if (block == null)
            {
                return(false);
            }

            MakeExplosion(block.PO.WorldPosition + block.Position);
            BlockHitSound.Play();
            LogicRef.AddPoints(69);
            block.Enabled       = false;
            otherEntity.Enabled = false;
            return(true);
        }
示例#5
0
        public bool CheckEating()
        {
            ModelEntity block = DidEntityCollide(LogicRef.PlayerRef);

            if (block == null)
            {
                return(false);
            }

            LogicRef.PlayerRef.Velocity =
                VelocityFromVectorsZ(LogicRef.PlayerRef.Position,
                                     block.Position, 120);

            if (Helper.RandomMinMax(0, 10) == 10)
            {
                BlockEatSound.Play();
                block.Enabled = false;
                LogicRef.AddPoints(160);
                return(true);
            }

            return(false);
        }
示例#6
0
 void RemoveNumber(ModelEntity numberE)
 {
     NumberEntities.Remove(numberE);
 }