Merge branch 'dhain' into develop

This commit is contained in:
dhain 2022-06-10 09:45:43 +02:00
commit f01a969ddf
4 changed files with 37 additions and 12 deletions

View file

@ -1,16 +1,25 @@
using System;
using DefaultNamespace;
using UnityEngine;
using Random = UnityEngine.Random;
public class Animal : MonoBehaviour {
protected Sprite animalSprite;
private Item producedItem;
private Item _producedItem;
private Rigidbody2D _rigidbody;
public Item ProducedItem => _producedItem;
protected Animal(Item producedItem) {
this.producedItem = producedItem;
private void Start() {
_rigidbody = gameObject.GetComponent<Rigidbody2D>();
_rigidbody.velocity = new Vector2(Random.Range(1, 10),
Random.Range(1, 10));
}
// TODO: Movement
private void Update() {
_rigidbody.velocity = new Vector2(_rigidbody.velocity.x * Random.Range(0, 10),
_rigidbody.velocity.y * Random.Range(0, 10));// TODO: wer?
}
// TODO: Animations
private void OnMouseDown() {

View file

@ -1,3 +0,0 @@
public interface IPurchasable {
}

View file

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: b4a4f63f7f474fa18f9b72f6ac175e7f
timeCreated: 1654844062