Пример #1
0
    protected virtual void Update()
    {
        if (Input.GetMouseButtonDown(0) == true && Camera.main != null)
        {
            var ray      = Camera.main.ScreenPointToRay(Input.mousePosition);
            var distance = D2D_Helper.Divide(ray.origin.z, ray.direction.z);
            var point    = ray.origin - ray.direction * distance;

            D2D_Destructible.StampAll(point, Size, Angle, StampTex, Hardness, Layers);
        }
    }
Пример #2
0
    public void Explode()
    {
        var angle = transform.rotation.eulerAngles.z + AngleOffset + Random.Range(-0.5f, 0.5f) * AngleRandomness;

        D2D_Destructible.StampAll(transform.position, Size, angle, StampTex, Hardness, Layers);
    }
Пример #3
0
    protected override void Execute()
    {
//		var angle = transform.rotation.eulerAngles.z + AngleOffset + Random.Range(-0.5f, 0.5f) * AngleRandomness;

        D2D_Destructible.StampAll(transform.position, Size, 0f, StampTex, Hardness, Layers);
    }