public override void renderUpdate(int front, MyCamera camera, ref DrawBuffer draw_buffer) { var v = camera.getScreenPoint(ref target_cursor_.transform_.position_); if (v.z > 0) { var rect = new Rect(v.x, v.y, 96f, 96f); MySprite.Instance.put(front, ref rect, MySprite.Kind.Cursor, MySprite.Type.Full); } // trail if (l_trail_ >= 0) { Trail.Instance.renderUpdate(front, l_trail_); } if (r_trail_ >= 0) { Trail.Instance.renderUpdate(front, r_trail_); } draw_buffer.registPlayer(ref rigidbody_.transform_); }
public void renderUpdate(int front, MyCamera camera) { if (!disabled_ && (locked_ || fired_)) { var v = camera.getScreenPoint(ref updated_position_); if (v.z > 0f) { if (sight_id_ >= 0) { if (Sight.Instance.isShown(sight_id_)) { Sight.Instance.renderUpdate(sight_id_, v.x, v.y); } else { var rect = new Rect(v.x, v.y, 32, 32); // var col = fired_ ? new Color(1f, 0.5f, 0f) : new Color(0.1f, 1f, 0.2f); var type = fired_ ? MySprite.Type.LockFired : MySprite.Type.Locked; MySprite.Instance.put(front, ref rect, MySprite.Kind.Target, type); } } } } }