コード例 #1
0
ファイル: LowKickState.cs プロジェクト: 3EZ-Studios/SaltyBid
 public LowKickTrinket(
     Character owner,
     Animator animator,
     MockInputBuffer inputBuffer) : base(owner)
 {
     this.animator    = animator;
     this.inputBuffer = inputBuffer;
 }
コード例 #2
0
    // 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));
    }
コード例 #3
0
ファイル: Character.cs プロジェクト: 3EZ-Studios/SaltyBid
    // 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));
    }