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); }
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); }
ModelEntity DidEntityCollide(ModelEntity otherEntity) { foreach (ModelEntity block in TheBlocks) { if (block.Enabled) { if (block.Sphere.Intersects(otherEntity.Sphere)) { return(block); } } } return(null); }
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); }
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); }
void RemoveNumber(ModelEntity numberE) { NumberEntities.Remove(numberE); }