Exemplo n.º 1
0
        public void drawObject(IDisplayed displayObject)
        {
            Vector2 pos      = relativePosition(displayObject.position);
            float   rotation = relativeRotation(displayObject.rotation);

            displayObject.draw(pos, rotation);
        }
Exemplo n.º 2
0
 public void Display(IDisplayed displayed)
 {
     if (this.displayed != null)
     {
         this.displayed.DisplayUpdateEvent -= UpdateDisplay;
     }
     this.displayed = displayed;
     SetTexts(this.displayed.DisplayStrings);
     SetSprites(this.displayed.DisplaySprites);
 }
Exemplo n.º 3
0
    private void Update()
    {
        Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
        RaycastHit hit;

        if (Physics.Raycast(ray, out hit))
        {
            cursorObject.transform.position = hit.transform.position;
            foreach (MonoBehaviour m in hit.transform.gameObject.GetComponents <MonoBehaviour>())
            {
                IDisplayed iDisplayed = (IDisplayed)m;
                if (iDisplayed != null)
                {
                    cursorDisplay.Display(iDisplayed);
                }
            }
        }
    }
Exemplo n.º 4
0
 public void drawObject(IDisplayed displayObject)
 {
     Vector2 pos = relativePosition(displayObject.position);
     float rotation = relativeRotation(displayObject.rotation);
     displayObject.draw(pos, rotation);
 }
Exemplo n.º 5
0
 public void SpeciesListChange(IDisplayed species)
 {
     portraitGenerator.SetSpecies((Species)species);
     player.Species = (Species)species;
 }
Exemplo n.º 6
0
 public void DelObj(IDisplayed obj)
 {
     _map.DelObj(obj);
 }
Exemplo n.º 7
0
 public void AddObj(IDisplayed obj)
 {
     _map.AddObj(obj);
 }
Exemplo n.º 8
0
 public void DelObj(IDisplayed obj)
 {
     _mapObjects.Remove(obj);
 }
Exemplo n.º 9
0
 public void AddObj(IDisplayed obj)
 {
     _mapObjects.Add(obj);
 }
Exemplo n.º 10
0
 public void UpdateDisplay(IDisplayed displayed)
 {
     SetTexts(this.displayed.DisplayStrings);
     SetSprites(this.displayed.DisplaySprites);
 }