示例#1
0
 public void Awake()
 {
     isAlone = true;
     Path    = FindObjectOfType <PathObjects>();
     //playerSpecificHome = this.transform;
     //isMoveDone = true;
     //dr = FindObjectOfType<DiceRoll>();
 }
 public void Init(PathObjects target, Vector3 local)
 {
     center = target.position;
     //distance = Mathf.Abs(local.z) ;
     //Debug.Log("distance::::"+distance);
     //x = 0;
     //y = 0;
     // h = local.y;
     IsChangeMiddle = true;
     // distance = dis;
 }
示例#3
0
    public void Init(MyTransform my, List <ShowMessage> subMats)
    {
        this.subMats = subMats;
        this.my      = my;
        RefreshSelfButton(true);

        PathObjects po1 = new PathObjects(my.Spownpos, my.Spownrot);

        PathObjects po2 = new PathObjects(my.Spownpos, my.Spownrot);

        PathObjects po3 = new PathObjects(my.Targetpos, my.Targetrot);

        camepath = new PathObjects(my.Camerapos, my.Camerarot);

        path[0] = po1;
        path[1] = po2;
        path[2] = po3;
    }
示例#4
0
    public void Init(PathObjects target, CameraControllerType cc, Action act = null)
    {
        stopat.OnEnter = act;

        if (this.enabled)
        {
            state = moveto;
        }
        else
        {
            state = stopat;
        }

        if (target != null)
        {
            AutoTarget = target;
        }
        this.cameraType = cc;
    }
示例#5
0
    public void ChoiseCamera(bool isauto, PathObjects target = null, Action act = null)
    {
        if (isauto)
        {
            if (target != null)
            {
                autocontroller.Init(target, CameraControllerType.atuo, act);
            }
        }

        //CoordinateSystem.enabled = !isauto;
        //handcontroller.enabled = !isauto;


        if (!isauto && target != null)
        {
            Vector3 lo = handcontroller.transform.localPosition;
            handcontroller.Init(target, lo);
        }
        lasttarget = target;
    }
示例#6
0
文件: Path.cs 项目: MihirKapile/LUDO
 void Start()
 {
     pathParent = GetComponentInParent <PathObjects>();
 }