Пример #1
0
    public override void OnStartServer()
    {
        ServerOnUnitSpawned?.Invoke(this);

        health              = GetComponent <Health>();
        health.ServerOnDie += ServerHandleDie;
    }
Пример #2
0
    public override void OnStartServer()
    {
        // base.OnStartServer();
        ServerOnUnitSpawned?.Invoke(this);

        health.ServerOnDie += ServerhandleDie;
    }
Пример #3
0
 public override void OnStartServer()
 {
     //TODO
     ServerOnUnitSpawned?.Invoke(this);
     //Subscribe to event
     health.ServerOnDie += ServerHandleDie;
 }
Пример #4
0
 public override void OnStartServer()
 {
     //Adding Units
     ServerOnUnitSpawned?.Invoke(this);
     //Subscribe This Event
     //Health is 0 Then Destroy
     health.ServerOnDie += ServerHandleDie;
 }
Пример #5
0
    public override void OnStartServer()
    {
        //Trigger onSpawn event. E.G when this script starts no server. We pass the Unit Gameobject attached to this script to RTSPlayer where it adds to correct client.
        ServerOnUnitSpawned?.Invoke(this);

        //Subscribe to Health Death Event
        health.ServerOnDie += ServerHandleDie;
    }
Пример #6
0
 public override void OnStartServer()
 {
     //base.OnStartServer();
     ServerOnUnitSpawned?.Invoke(this);
 }
 public override void OnStartServer()
 {
     health.ServerOnDie += ServerHandleDie;
     ServerOnUnitSpawned?.Invoke(this);
 }
Пример #8
0
 public override void OnStartServer()
 {
     // trigger event which will invoke the callbacks in the RtsPlayer script
     ServerOnUnitSpawned?.Invoke(this);
     health.ServerOnDie += ServerHandleOnDie;
 }
Пример #9
0
 public override void OnStartServer()
 {
     ServerOnUnitSpawned?.Invoke(this);
     health.ServerOnDie += ServerHandleDie; // subscribing to the event
 }