public LowKickTrinket( Character owner, Animator animator, MockInputBuffer inputBuffer) : base(owner) { this.animator = animator; this.inputBuffer = inputBuffer; }
// Start is called before the first frame update void Start() { inputBuffer = GetComponent <MockInputBuffer>(); animator = GetComponentInChildren <Animator>(); Character character = GetComponent <Character>(); character.EquipTrinket(new PunchTrinket(character, animator, inputBuffer)); character.EquipTrinket(new LowKickTrinket(character, animator, inputBuffer)); character.EquipTrinket(new HighKickTrinket(character, animator, inputBuffer)); }
// Start is called before the first frame update void Start() { Opponent = FindObjectsOfType <Character>().Where(c => c != this).Single(); inputBuffer = GetComponent <MockInputBuffer>(); rigidBody = GetComponent <Rigidbody2D>(); // TODO: Turn this into a singleton? Or maybe add a way to get it from the scene? eventManager = GameObject.Find("FightScene")?.GetComponent <EventManager>(); getDefaultTrinkets().ForEach(t => EquipTrinket(t)); }