コード例 #1
0
ファイル: Building.cs プロジェクト: FSorek/Essence2021
    public void Tick()
    {
        timer -= Time.deltaTime;
        if (timer > 0 || Finished)
        {
            return;
        }
        var spawnPosition  = PlayerInput.Instance.MouseRayHitPoint;
        var createdEssence = WorldSettings.EssenceFactory.CreateEssence(essence, spawnPosition);

        Finished = true;
        cachedTarget.AddEssence(createdEssence);
    }
コード例 #2
0
    public void Tick()
    {
        timer -= Time.deltaTime;
        if (timer > 0)
        {
            return;
        }
        var extractedEssence = player.ExtractEssence();

        cachedTarget.AddEssence(extractedEssence);
        timer    = infusionTime;
        Finished = true;
    }