void ISignalListener <SpawnUnitSignal> .SignalFired(SpawnUnitSignal signal) { ClientOnlyConditionalDebug.Log("spawn"); var viewInstance = Object.Instantiate(signal.View, signal.Position, Quaternion.identity); var unit = new Entities.Unit(signal.Data, viewInstance); _signalService.FireSignal(new UnitSpawnedSignal(unit)); }
private int GetCalculatedDamage(int damage, Vector3 damagePosition, Vector3 targetPosition) { RaycastHit hit; UnityEngine.Debug.DrawLine(damagePosition, targetPosition); if (!Physics.Linecast(damagePosition, targetPosition, out hit) || hit.transform.GetComponent <ObstacleView>() == null) { return(damage); } ClientOnlyConditionalDebug.Log("obstacle found"); return((int)(damage * _settings.ObstacleFactor)); }
private void Awake() { ClientOnlyConditionalDebug.Log("game started"); Assert.IsNotNull(_unitGenerationSettingsProvider); Assert.IsNotNull(_bombGenerationSettingsProvider); Assert.IsNotNull(_damageSettingsProvider); _currentContext = new GameContext( _unitGenerationSettingsProvider.Settings, _bombGenerationSettingsProvider.Settings, _damageSettingsProvider.Settings); _currentContext.Init(); ClientOnlyConditionalDebug.Log("context created"); }
public UnitDamageService(ISignalService signalService, DamageSettings settings) { _signalService = signalService; _settings = settings; ClientOnlyConditionalDebug.Log("hello I am damage service"); }
public BombGenerationService(ISignalService signalService, BombGenerationSettings settings) { _signalService = signalService; _settings = settings; ClientOnlyConditionalDebug.Log("hello I am unit generation service"); }