コード例 #1
0
ファイル: Projectile.cs プロジェクト: AkuKuylaars/Blocklands
 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
ファイル: Player.cs プロジェクト: AkuKuylaars/Blocklands
        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>();
 }