Ejemplo n.º 1
0
 public Relax()
 {
     osuManager      = DependencyContainer.Get <OsuManager>();
     configManager   = DependencyContainer.Get <ConfigManager>();
     inputSimulator  = new InputSimulator();
     accuracyManager = new AccuracyManager();
 }
Ejemplo n.º 2
0
    void initialise()
    {
        initialised = true;
        // make sure there is a parent
        if (transform.parent == null)
        {
            return;
        }
        if (parent == null)
        {
            parent = transform.parent.gameObject;
        }
        if (parent == null)
        {
            Debug.LogError("BlindParent component has no parent"); return;
        }
        // find the parent's accuracy manager
        am = parent.gameObject.GetComponent <AccuracyManager>();

        if (am)
        {
            am.numberOfBlinds++;
        }

        parentBaseStats = parent.GetComponent <BaseStats>();
        if (parentBaseStats)
        {
            parentBaseStats.ChangeStatModifier(Tags.Properties.CriticalChance, percentCritChanceBuff, BaseStats.ModType.MORE);
        }

        // subscribe to a death event to remove the buffs
        if (GetComponent <SelfDestroyer>())
        {
            GetComponent <SelfDestroyer>().deathEvent += removeBlind;
        }
    }