Esempio n. 1
0
 public void Initialize()
 {
     ColonistBlueprint.Create(1, 16);
     ColonistBlueprint.Create(3, 15);
     ColonistBlueprint.Create(8, 17);
     ColonistBlueprint.Create(2, 16);
     MineTaskBlueprint.Create(9, 24);
     MineTaskBlueprint.Create(11, 25);
 }
Esempio n. 2
0
    protected override void Execute(List <InputEntity> entities)
    {
        var        lmb      = context.leftMouseEntity;
        Vector3    position = new Vector3(lmb.mouseUp.x, lmb.mouseUp.y, 0);
        RaycastHit hit;
        Ray        ray = camera.ScreenPointToRay(position);

        if (Physics.Raycast(ray, out hit, 100, LayerMask.GetMask("Mountain")))
        {
            Transform ob = hit.transform;

            var x = Mathf.FloorToInt(hit.point.x);
            var y = Mathf.FloorToInt(hit.point.z);
            if (map.GetTile(x, y).hasMountain)
            {
                MineTaskBlueprint.Create(x, y);
            }
        }
    }