private static GameObject colObj; // Object that collides with the trigger.

    void OnCollisionEnter(Collision other)
    {
        if (other.gameObject.GetComponent <Collider>().tag == "Player")
        {
            // Debug.Log("Called " + other.gameObject.GetComponent<ThirdPersonCharacter>().player.gStats.changeStat("health", -3f));
            // other.gameObject.GetComponent<Entity>().activeEffects.Add(EffectsService.getEffect("Fire"));
            other.gameObject.GetComponent <Entity>().AddEffectLimited(EffectsService.getEffect("Poison"));
            // Debug.Log("Worked?  " + other.gameObject.GetComponent<Entity>().activeEffects[0].Run(other.gameObject.GetComponent<Entity>()));
            //player.GetComponent<Player>().gStats.changeStat("health",-5f)
        }
    }
Exemple #2
0
        public RollModule(
            CharacterService characterService,
            EffectsService effectsService,
            HelpService helpService,
            NpcService npcService,
            RollService rollService,
            SpecialService specialService,
            Random random)
        {
            _charService    = characterService;
            _effectsService = effectsService;
            _helpService    = helpService;
            _npcService     = npcService;
            _rollService    = rollService;
            _specialService = specialService;

            _random = random;
        }
Exemple #3
0
 public CharacterSkillsModule(
     CharacterService charService,
     EffectsService effectsService,
     ExperienceService expService,
     ProgressionOptions progOptions,
     RoleplayOptions roleplayOptions,
     SkillsService skillsService,
     SpecialService specService,
     StatisticsService statsService,
     HelpService helpService)
 {
     _charService     = charService;
     _effectsService  = effectsService;
     _expService      = expService;
     _progOptions     = progOptions;
     _roleplayOptions = roleplayOptions;
     _skillsService   = skillsService;
     _specService     = specService;
     _statsService    = statsService;
     _helpService     = helpService;
 }
 public float Run(Entity entity)
 {
     return(EffectsService.runEffect(Name, entity));
 }
Exemple #5
0
 public NpcEffectsModule(EffectsService effectsService, NpcService npcService)
 {
     _effectsService = effectsService;
     _npcService     = npcService;
 }
Exemple #6
0
 public EffectsModule(EffectsService effectsService)
 {
     _effectsService = effectsService;
 }
Exemple #7
0
 public CharacterEffectsModule(CharacterService charService, EffectsService effectsService)
 {
     _charService    = charService;
     _effectsService = effectsService;
 }
 public CharacterSpecialModule(CharacterService charService, EffectsService effectsService, SpecialService specService)
 {
     _charService    = charService;
     _effectsService = effectsService;
     _specService    = specService;
 }