コード例 #1
0
 public void Fire(Vector3 Direction, float AttackPower, GameObject owner, AttackDebuffs debuffs)
 {
     this.debuffs = debuffs;
     this.owner   = owner;
     damage       = (int)(damage * AttackPower);
     rbody.AddForce(Direction.normalized * launchForce, ForceMode.Impulse);
 }
コード例 #2
0
    private void Start()
    {
        // Create some debuffs that will be applied on attack
        AttackDebuffs poisonDebuff = () => { return(new PoisonedStatus(5, 10)); };
        AttackDebuffs slowDebuff   = () => { return(new SlowStatus(1, 10)); };

        // Add them to the debuff delegate
        debuffs = poisonDebuff + slowDebuff;
    }