Exemple #1
0
    private void DropOutBonus(DropOut bonusType)
    {
        float randomRate = Random.Range(0, 100);

        if (randomRate <= bonusType.dropOutRate * 100)
        {
            Instantiate(bonusType.dropOutObj, transform.position + new Vector3(Random.Range(-1f, 1f), Random.Range(-1f, 1f)), Quaternion.identity);
        }
    }
Exemple #2
0
 void InstantiateDropOut(float chance, DropOut dropOut)
 {
     if (chance <= dropOut.percentage)
     {
         Rigidbody2D dropOutInstance;
         dropOutInstance = Instantiate(dropOut.rigidbody, this.transform.position, this.transform.rotation);
         //if () ;
         dropOutInstance.AddForce(new Vector2(Random.Range(-1, 1), Random.Range(-1, 1)) * Random.Range(-200, 200));
     }
 }
Exemple #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ActivationFunction.Length != 0)
            {
                hash ^= ActivationFunction.GetHashCode();
            }
            if (DropOut != 0D)
            {
                hash ^= DropOut.GetHashCode();
            }
            hash ^= neurons_.GetHashCode();
            hash ^= biases_.GetHashCode();
            return(hash);
        }