blob: 427e442efc9205a789bc5951fd9300078894504a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
using System;
using UnityEngine;
public class GunLevel : MonoBehaviour
{
public Gun copyTo;
private Gun copyFrom;
private void Start()
{
copyFrom = GetComponent<Gun>();
AttackLevel componentInParent = GetComponentInParent<AttackLevel>();
componentInParent.LevelUpAction = (Action<int>)Delegate.Combine(componentInParent.LevelUpAction, new Action<int>(BuffGun));
}
public void BuffGun(int level)
{
ApplyCardStats.CopyGunStats(copyFrom, copyTo);
}
}
|