示例#1
0
 public void Fire(TriggerFiredEventArgs args)
 {
     try {
         TriggerFire?.Invoke(this, args);
     } catch (Exception ex) {
         sourceLogger.Error(ex, "Internal Dispatcher Error");
         throw;
     }
 }
示例#2
0
    void PhaseOne()
    {
        phaseOneActive      = true;
        targetPositionOne   = new Vector3(Random.Range(-phaseOneRange, phaseOneRange), 0, Random.Range(-phaseOneRange, phaseOneRange));
        targetPositionTwo   = new Vector3(Random.Range(-phaseOneRange, phaseOneRange), 0, Random.Range(-phaseOneRange, phaseOneRange));
        targetPositionThree = new Vector3(Random.Range(-phaseOneRange, phaseOneRange), 0, Random.Range(-phaseOneRange, phaseOneRange));

        targetPositionOne   += transform.position + new Vector3(10, 0, 10);
        targetPositionTwo   += transform.position + new Vector3(10, 0, 10);
        targetPositionThree += transform.position + new Vector3(10, 0, 10);

        TriggerFire indicator1 = Instantiate(indicator, targetPositionOne, Quaternion.identity).GetComponent <TriggerFire>();
        TriggerFire indicator2 = Instantiate(indicator, targetPositionTwo, Quaternion.identity).GetComponent <TriggerFire>();
        TriggerFire indicator3 = Instantiate(indicator, targetPositionThree, Quaternion.identity).GetComponent <TriggerFire>();

        indicator1.SetTarget(this);
        indicator2.SetTarget(this);
        indicator3.SetTarget(this);
    }
示例#3
0
 void Start()
 {
     triggerFire = transform.root.GetComponent <TriggerFire>();
 }