protected override void Awake() { base.Awake(); ClickBegin = new BaseGameEvent(); ClickEnd = new BaseGameEvent(); }
protected override void Awake() { m_Manager = this; manager = this; weaponHit = new BaseGameEvent(); initCombo(); }
public bool AddBullet(BaseGameEvent theEvent) { BulletFiredEvent bulletFired = (BulletFiredEvent)theEvent; bullets.Add(bulletFired.Bullet); return(true); }
protected void Awake() { base.Awake(); isDead = new BaseGameEvent(); isHit = new GaugeEvent(); isHeal = new GaugeEvent(); }
void Awake() { m_Manager = this; onPlay = new BaseGameEvent(); onMenu = new BaseGameEvent(); onGameOver = new BaseGameEvent(); }
private void RemoveEntity(BaseGameEvent theEvent) { ActorRemovedEvent removalEvent = theEvent as ActorRemovedEvent; GameEntity entity = removalEvent.DeadEntity; if(entity is MovingEntity) movingEntityMap.Remove(entity.actorID); }
private void AddEntity(BaseGameEvent theEvent) { ActorCreatedEvent creationEvent = theEvent as ActorCreatedEvent; GameEntity entity = creationEvent.NewEntity; if(entity is MovingEntity) movingEntityMap.Add(entity.actorID, entity as MovingEntity); }
private void RemoveEntity(BaseGameEvent theEvent) { ActorRemovedEvent removalEvent = theEvent as ActorRemovedEvent; GameEntity entity = removalEvent.DeadEntity; if (entity is MovingEntity) { movingEntityMap.Remove(entity.actorID); } }
private void AddEntity(BaseGameEvent theEvent) { ActorCreatedEvent creationEvent = theEvent as ActorCreatedEvent; GameEntity entity = creationEvent.NewEntity; if (entity is MovingEntity) { movingEntityMap.Add(entity.actorID, entity as MovingEntity); } }
private void RenewRegion(BaseGameEvent theEvent) { if (synchronising) { synchronising = false; foreach (Region region in (theEvent as SendingRegionListEvent).CurrentRegionList) { AddRegion(region); } } }
public bool AnalyzeCollision(BaseGameEvent theEvent) { BulletHitMechEvent bulletHit = (BulletHitMechEvent)theEvent; if (bulletHit.Mech.mechId == mechId) { currHp -= bulletHit.Bullet.Damage; if (!IsAlive) { ScrapWarsEventManager.GetManager().SendEvent(new MechDiedEvent(this)); } } return(false); }
public bool MakeSound(BaseGameEvent theEvent) { SoundEffectInstance sound = null; switch (theEvent.EventType) { case "BulletHitMech": sound = SoundRepo.basicBulletHit.CreateInstance( ); sound.Volume = 0.01f * (float)Math.Pow(2, ((BulletHitMechEvent)theEvent).Bullet.BulletScale); break; default: sound = SoundRepo.basicBulletHit.CreateInstance(); sound.Volume = 0.0f; break; } sound.Play(); return(false); }
public void SendCurrentRegions(BaseGameEvent theEvent) { SendingRegionListEvent sendingRegionsEvent = new SendingRegionListEvent(new Optional <object>(this), 0, regionMap.Values.ToList()); }
private void AddRegion(BaseGameEvent theEvent) { Region newRegion = (theEvent as RegionCreatedEvent).Data.newRegion; AddRegion(newRegion); }
protected virtual void Awake() { gameEvent = (BaseGameEvent <T>)target; }