public void Initialize(Railgun _railgun) { StartCoroutine(WaitForTrail()); railgun = _railgun; chargedProjectile = railgun.FullCharge; speed = (!chargedProjectile) ? railgun.MuzzleVelocity * (railgun.ChargePercent + 1) : railgun.MuzzleVelocity * railgun.ChargeMultiplier; damage = (!chargedProjectile) ? railgun.Damage : railgun.Damage * railgun.ChargeMultiplier; Start(); }
void Start() { NoHitKillCount = ScoreManager.KillCombo; Grid grid = GameObjectList.GetAliveGrid(); transform.position = new Vector3(grid.CenterNode.transform.position.x, grid.CenterNode.transform.position.y + 1, grid.CenterNode.transform.position.z); playerMaterial = GetComponent<Renderer>().material; defaultColor = playerMaterial.color; railgun = GetComponentInChildren<Railgun>(); controller = GetComponent<PlayerController>(); mainCamera = Camera.main; GameManager.OnStartLevel += OnLevelStart; }
void Start() { GameManager.OnGameOver += OnGameOver; player = GameObjectList.GetAlivePlayer(); railgun = FindObjectOfType<Railgun>(); }