예제 #1
0
 private void Save()
 {
     PersistPrefs.Save(this);
     ExampleHelper.DrawLine();
     Debug.Log("Values Saved");
     someString.ToLog("SomeString: ");
     someBool.ToLog("SomeBool: ");
     someInt.ToLog("SomeInt: ");
     someFloat.ToLog("SomeFloat: ");
     ExampleHelper.DrawLine();
 }
    // Use this for initialization
    private void Start()
    {
        object goldenArmor = new object(); // some Item

        healthIncreaser.Source = goldenArmor;
        ExampleHelper.DrawLine();
        Debug.Log("TPAttribute Health Base value: " + health.BaseValue);
        Debug.Log("TPAttribute Health Value before armor equip(healthIncreaser): " + health.Value);
        health.Modifiers.Add(healthIncreaser);
        Debug.Log("TPAttribute Health Value after armor equip(healthIncreaser): " + health.Value);
        ExampleHelper.DrawLine();
    }
예제 #3
0
    // Use this for initialization
    private void Start()
    {
        int elLength = gameObjects.Length;

        probabilityElements = new ProbabilityElementInt <GameObject> [elLength];
        int[] randomProbabilities = RandomSystem.RandomProbabilities(elLength, 20, 70);

        ExampleHelper.DrawLine();
        for (int i = 0; i < elLength; i++)
        {
            probabilityElements[i] = new ProbabilityElementInt <GameObject>(
                Instantiate(gameObjects[i], TP.Framework.Unity.RandomSystem.InsideUnitSquare() * 5, Quaternion.identity),
                randomProbabilities[i]);
            Debug.Log("Random probability of object: " + probabilityElements[i].Probability);
        }
        ExampleHelper.DrawLine();

        StartCoroutine(TPRandomToggleObject(repeatCount));
    }