Example #1
0
	void Awake()
	{
		aniCtrl = GetComponentInChildren<AnimationForFx>();
		fxPreview = GetComponentInChildren<CharacterFxPreview>();
		D.Assert(aniCtrl != null);
		float h = Screen.height / 3;
		axisRect = new Rect(0, 0, h * 2, h * 2);
		axisCenter = new Vector2(h, h);
		cc = GetComponent<CharacterController>();
	}
Example #2
0
	public void SetCharacter(GameObject obj)
	{
		character = obj;
		character.transform.parent = transform;

		cCtrl = character.AddComponent<CharacterCtrlForFX>();
		fxPreview = character.AddComponent<CharacterFxPreview>();
		
		
		//fxPreview.allFx = allFx;

		

		cCtrl.speed = 0;
		character.AddComponent<AnimationForFx>();
	}