示例#1
0
 private void GainSexExp(bool organ, ExpSystem expSystem)
 {
     if (organ)
     {
         expSystem.GainExp(Random.Range(1, 5));
     }
 }
示例#2
0
    public override void OnStartLocalPlayer()
    {
        base.OnStartLocalPlayer();
        GameManager.SetLocalPlayer(this);
        GameManager.AddPlayer(this);
        Camera.main.GetComponent <CameraFollow>().SetTarget(transform);

        Transform hud          = GameObject.FindGameObjectWithTag("HUD").transform;
        Transform playerStatus = hud.Find("Player Status");
        Transform hpObj        = playerStatus.Find("HP");

        hpText = hpObj.GetComponentInChildren <Text>();
        hpBar  = hpObj.Find("hp_background").GetChild(0).GetComponentInChildren <Image>();
        Transform skillObj = playerStatus.Find("Skill");

        for (int i = 0; i < MaxSkill; i++)
        {
            spellIcons[i] = skillObj.GetComponentsInChildren <Image>()[i];
        }
        Transform expObj = playerStatus.Find("Exp");

        expBar    = expObj.Find("Background").Find("Filled").GetComponent <Image>();
        expText   = expObj.GetComponentInChildren <Text>();
        coinText  = hud.Find("Coin").GetComponentInChildren <Text>();
        expSystem = new ExpSystem(expBar, expText);

        RefreshCoinHUD();
    }
示例#3
0
 private void OnCollisionEnter(Collision collision)
 {
     if (collision.transform.tag == "Player")
     {
         ExpSystem.GainExp(1);
         Destroy(gameObject);
     }
 }
 void Die()
 {
     if (myInfo.hp <= 0)
     {
         ExpSystem.UpdateExp(myInfo.exp);
         Destroy(this.gameObject);
     }
 }
示例#5
0
 void Start()
 {
     expSystem          = GetComponent <ExpSystem>();
     expSystem.OnLvlUp += ExpSystem_OnLvlUp;
     controller         = GetComponent <Controller>();
     controller.equpimentXar.OnItemChanged += EqupimentXar_OnItemChanged;
     OnTextChanged += StatsSystem_OnTextChanged;
     SetupStats(2, 1, 2);
     StatsSystem_OnTextChanged(this, EventArgs.Empty);
 }
 // Start is called before the first frame update
 void OnEnable()
 {
     rb      = GetComponent <Rigidbody>();
     HM      = GetComponent <HealthManager>();
     player  = GameObject.FindGameObjectWithTag("Player");
     control = player.GetComponent <PlayerControl>();
     expsys  = player.GetComponent <ExpSystem>();
     HM.zeroHealthEvent.AddListener(delegate { control.IncreaseOverKill(increaseOverKill); });
     HM.zeroHealthEvent.AddListener(delegate { expsys.gainexp(101); });
 }
示例#7
0
    public virtual void Start()
    {
        identity = new Identity();
        SexualOrgan.SomethingChanged += DidGenderChange;

        expSystem = new ExpSystem(1);
        DateSystem.NewDayEvent += this.GrowFetuses;
        DateSystem.NewDayEvent += PregnancySystem.GrowChild;
        gameEvent = new GameEventSystem(this);
        SpriteHandler.Setup(this);
    }
示例#8
0
    //public ProgressBarCircle PbC;

    private void Start()
    {
        hm = GameObject.FindWithTag("Player").GetComponent <ExpSystem>();
    }
    // Update is called once per frame
    void Update()
    {
        int lv = PlayerManager.Exp.GetLv();

        if (type == showIn.Lv)
        {
            text.text = lable + " " + lv.ToString();
        }
        else if (type == showIn.Exp)
        {
            text.text = lable + " " + PlayerManager.Exp.GetValue().ToString() + "/" + ExpSystem.GetEachLvValue(lv).ToString();
        }
    }
示例#10
0
 public OrganAndItsExp(bool useOrgan, ExpSystem organExp)
 {
     UseOrgan = useOrgan;
     OrganExp = organExp;
 }