示例#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
文件: Unit.cs 项目: jlarnett/RTSSC
    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
 }