Есть абстрактный класс и наследующий от него
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public abstract class Angles4
{
public Vector3 objpos;
public float step;
public Vector3 downleft;
public Vector3 downright;
public Vector3 upleft;
public Vector3 upright;
public Angles4(Vector3 _objpos, float _step = 1f)
{
this.objpos = _objpos;
this.step = _step;
}
public void ChangeStep(float _newstep)
{
this.step = _newstep;
}
public virtual void setdownleft()
{
downleft = new Vector3(Random.Range(objpos.x - step, objpos.x), Random.Range(objpos.y - step, objpos.x), objpos.z);
}
public abstract void setdownright();
public abstract void setupright();
public abstract void setupleft();
}
public class RectShape : Angles4
{
public RectShape(Vector3 _objpos, float _step) : base(_objpos, _step)
{
objpos = _objpos;
step = _step;
}
public override setdownleft()
{
downleft = new Vector3(objpos.x - step, objpos.y - step, objpos.z);
}
public override setdownright()
{
downright = new Vector3(objpos.x + step, objpos.y - step, objpos.z);
}
public override setupright()
{
upright = new Vector3(objpos.x + step, objpos.y + step, objpos.z);
}
public override setupleft()
{
downright = new Vector3(objpos.x - step, objpos.y + step, objpos.z);
}
}
Методы setdownleft, setdownright, setupright, setupleft все выделяются красным. ошибка -
Откуда эта ошибка?