public Lightstone createShadowStone(Color colOne, Color colTwo) { int stoneRange = 20; Color stoneColor = new Color(colOne.red + colTwo.red, colOne.green + colTwo.green, colOne.blue + colTwo.blue); //pick a random position on the board that lets it have full range int rand2 = Helpah.d2i(Stage.CurrentStage.GetSize().width) - stoneRange; int stoneX = Helpah.Rand(stoneRange, rand2); rand2 = Helpah.d2i(Stage.CurrentStage.GetSize().height) - stoneRange; int stoneY = Helpah.Rand(stoneRange, rand2); Lightstone shadowStone = new Lightstone( stoneX, stoneY, 10, stoneRange); shadowStone.SetColor(stoneColor); shadowStone.SetParentStage(Stage.CurrentStage); shadowStone.AddCustomStyling("shadowStone"); //this modifies the z-index... return shadowStone; }
public Lightstone createLightStone(Color color, Lightstone nearShadow) { int stoneRange = 20; //pick a position within range of the shadowstone int stoneX = Helpah.Rand(Helpah.d2i(nearShadow.GetPosition().x - nearShadow.GetRange()), Helpah.d2i(nearShadow.GetPosition().x + nearShadow.GetRange())); int stoneY = Helpah.Rand(Helpah.d2i(nearShadow.GetPosition().y - nearShadow.GetRange()), Helpah.d2i(nearShadow.GetPosition().y + nearShadow.GetRange())); //pick a random position on the board that lets it have full range Lightstone newStone = new Lightstone( stoneX, stoneY, 10, stoneRange); newStone.SetColor(color); //newStone.AddCustomStyling("gradientMan"); //newStone.SetPosition(10, 10); newStone.SetParentStage(WebDE.GameObjects.Stage.CurrentStage); //WebDE.GameObjects.Stage.CurrentStage.AddLivingGameEntity(newStone); newStone.Hide(); //stage is 80 wide and 60 tall. therefore... return newStone; }