Vector3.Div C# (CSharp) Метод

Div() публичный Метод

public Div ( Vector3 v ) : Vector3
v Vector3
Результат Vector3
  public Vector3 Div (Vector3 v) {
    return new Vector3(
        this.x / v.x,
        this.y / v.y,
        this.z / v.z
        );
  }

Same methods

Vector3::Div ( float v ) : Vector3

Usage Example

Пример #1
0
    public override void Initialize(World world, WorldCell cell)
    {
        base.Initialize(world, cell);

        IsAlive = true;
        SetEnergy(MaxEnergyValue);

        RandomGenerator = CurrentWorld.RandomGenerator;

        Direction         = Vector2Int.zero;
        NormalMoveSeconds = (float)MathFunctions.RandomDouble(RandomGenerator, MinAndMaxMoveSeconds);
        FastMoveDivisor   = (float)MathFunctions.RandomDouble(RandomGenerator, MinAndMaxFastMoveDivisor);
        FastMoveSeconds   = NormalMoveSeconds / FastMoveDivisor;
        MovementProgress  = 0;

        IsFemale = RandomGenerator.NextDouble() >= 0.5f;
        FemenineSprite.enabled  = IsFemale;
        MasculineSprite.enabled = !IsFemale;

        Render.transform.localScale = ChildScale.Div(transform.parent.lossyScale);
        transform.position          = CurrentPositionToReal();

        SecondsToGrow        = (float)MathFunctions.RandomDouble(RandomGenerator, MinAndMaxSecondsToGrow);
        ReproductionCooldown = (float)MathFunctions.RandomDouble(RandomGenerator, MinAndMaxReproductionCooldown);

        SecondsToOld = (float)MathFunctions.RandomDouble(RandomGenerator, MinAndMaxSecondsToOld);

        ActionsList = CreateActionsList();

        UpdateStateRenderer();
    }
All Usage Examples Of Vector3::Div