コード例 #1
0
 void Start()
 {
     targetpos = GetComponent <DestinationSetter>();
     healthBar.SetMaxHealth(health);
     healthBar.gameObject.SetActive(false);
     EnemyList.Add(this);
 }
コード例 #2
0
 public PlayerMovementManager(Player player)
 {
     _player            = player;
     _mover             = new Mover(_player, _player.DefaultMovementSpeed);
     _destinationSetter = new DestinationSetter(_player.transform, _mover);
     _inputProcessor    = new InputProcessor();
     _playerDashMonitor = new PlayerDashMonitor();
 }
コード例 #3
0
 private void Start()
 {
     for (int i = 0; i < numberOfEntitiesToSpawn; ++i)
     {
         GameObject        currentInstantiate       = Instantiate(prefabToSpawn);
         DestinationSetter currentDestinationSetter = currentInstantiate.GetComponent <DestinationSetter>();
         currentDestinationSetter.destinationA = destinationA;
         currentDestinationSetter.destinationB = destinationB;
         currentDestinationSetter.Init();
     }
 }