示例#1
0
 //    If number is not needed, just feed it a negative number. This will be the convention we use instead of assigning it random values
 public SpawnUnit(BBSpriteFactory.Sprite sprite, float spawnDelaySeconds, float spawnOffsetSeconds, BBCoordinate coordinate, bool atOpenCoordinate, BBEntityStats stats, int number)
 {
     this.sprite = sprite;
     this.spawnSeconds = spawnDelaySeconds + spawnOffsetSeconds;
     this.coordinate = coordinate;
     this.atOpenCoordinate = atOpenCoordinate;
     this.stats = stats;
     this.number = number;
 }
示例#2
0
 // Use this for initialization
 void Start()
 {
     this.spriteFactory = GetComponent<BBSpriteFactory>();
 }
示例#3
0
 //    Place wherever you want
 public SpawnUnit CreateSpawnUnit(BBSpriteFactory.Sprite sprite, float spawnDelaySeconds, BBCoordinate coordinate, bool atValidCoordinate, BBEntityStats stats, int number)
 {
     BBNode referencedNode = this.gridController.grid[coordinate.x, coordinate.y];
     return new SpawnUnit(sprite, spawnDelaySeconds, this.timer.Seconds, coordinate, atValidCoordinate, stats, number);
 }
示例#4
0
 public SpawnUnit CreateSpawnUnit(BBSpriteFactory.Sprite sprite, float spawnDelaySeconds, BBCoordinate coordinate, bool atValidCoordinate, BBEntityStats stats)
 {
     return this.CreateSpawnUnit(sprite, spawnDelaySeconds, coordinate, atValidCoordinate, stats, (int)BBSceneConstants.NumberConventions.DEFAULTNUMBER);
 }
 // Use this for initialization
 void Start()
 {
     this.factory = GameObject.FindGameObjectWithTag(BBSceneConstants.gameControllerTag).GetComponent<BBSpriteFactory>();
 }