コード例 #1
0
ファイル: Effect.cs プロジェクト: bnelligan/NHTI-Capstone
    // Serialize Confuse
    private void SerializeAsConfuse(Confuse effect)
    {
        int index = 0;

        sizeofEffect = 0;       // No additional info
        SerializeBaseEffect(effect, ref index);

        // No extra serialization
    }
コード例 #2
0
ファイル: Confuse.cs プロジェクト: bnelligan/NHTI-Capstone
    public override void ApplyEffect(GameObject target)
    {
        // Ref the player stat class
        PlayerStats ps = target.GetComponent <PlayerStats>();

        if (!ps)
        {
            Debug.LogError("No Player Stats class in target: " + target);
            return;
        }

        // Apply the effect
        Confuse confused = new Confuse(Lifetime);

        ps.AddEffect(confused);
    }
コード例 #3
0
 private void Start()
 {
     confusion = new Confuse(5.0f);
 }