protected void initPlayer() { rb = GetComponent <Rigidbody2D>(); sr = GetComponent <SpriteRenderer>(); ChangeColor(GameColorEnum.yellow); originPosition = transform.position; CSUtil.LOG(originPosition); moveable = GetComponent <Moveable>(); hittedCircle = new HashSet <GameObject>(); hittedPart = new List <GameObject>(); originScale = transform.localScale.x; }
public void ChangeColor(GameColorEnum c) { gameColor = c; CSUtil.LOG("changed color to " + (int)c); sr.color = colorList[(int)c]; }