示例#1
0
        public void Start()
        {
            gameManager = GetComponentInParent <CannonizerManager>();
            SetParentTo = gameManager.transform;

            enemySpawnner = new EnemySpawnner(
                SpawnPoints,
                DirectionsForEnemiesToGo,
                PrefabsToSpawn,
                SetParentTo,
                SpawnFrequencyInSeconds,
                MovementSpeed);

            gameManager.EnemySpawnnerReference = enemySpawnner;
        }
示例#2
0
        private void Start()
        {
            spriteOutline             = GetComponent <SpriteOutline>();
            spriteOutline.outlineSize = 9;
            spriteOutline.color       = Color.green;

            gameManager    = GetComponentInParent <CannonizerManager>();
            targetRotation = transform.rotation;
            ballDirection  = Vector2.left;
            canFire        = true;

            gameManager.ButtonEvents.OnUpButtonPressed          += HandleUpButtonPressed;
            gameManager.ButtonEvents.OnDownButtonPressed        += HandleDownButtonPressed;
            gameManager.ButtonEvents.OnLeftButtonPressed        += HandleLeftButtonPressed;
            gameManager.ButtonEvents.OnRightButtonPressed       += HandleRightButtonPressed;
            gameManager.ButtonEvents.OnActionButtonStateChanged += HandleActionButtonPressed;
        }
示例#3
0
 private void Start()
 {
     gameManager = GetComponentInParent <CannonizerManager>();
 }