Пример #1
0
 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();
 }
Пример #2
0
        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;
        }
Пример #3
0
 void Start()
 {
     GameManager.OnGameOver += OnGameOver;
     player = GameObjectList.GetAlivePlayer();
     railgun = FindObjectOfType<Railgun>();
 }