@Needle Engine Assistant
import { Behaviour, serializable } from β@needle-tools/engineβ;
import { Object3D } from βthreeβ;
export class BoardArea
{
@serializable(Object3D)
public Areatransform!: Object3D;
@serializable()
public AreaName!: string;
constructor(transform: Object3D, name: string)
{
this.Areatransform = transform;
this.AreaName = name;
}
}
export class MovementManager extends Behaviour
{
public boardTransforms!: Object3D;
@serializable(BoardArea)
public BoardAreaList: BoardArea=;
//List of classes where AreaTransform and AreaName is stored
// public BoardAreaList!: BoardArea;
columnAlphabet: string=[βAβ,βBβ,βCβ,βDβ,βEβ,βFβ,βGβ,βHβ];
awake()
{
console.log(βk11β);
this.GenerateArea;
console.log(this.BoardAreaList.length);
}
GenerateArea()
{
for(let i=0; i<8; i++)
{
for(let j=0; j<8; j++)
{
var index = i*8+j;
var transform = this.boardTransforms[index];
var name = this.columnAlphabet[i];
var number = j+1;
name = name.concat(number.toString());
var newArea = new BoardArea(transform,name);
this.BoardAreaList.push(newArea);
}
}
}
}
why is this commented out in converted c# script like this below.
namespace Needle.Typescript.GeneratedComponents
{
public partial class MovementManager : UnityEngine.MonoBehaviour
{
public UnityEngine.GameObject @boardTransforms;
// public @BoardAreaList = new { };
public string @columnAlphabet = new string{ βAβ, βBβ, βCβ, βDβ, βEβ, βFβ, βGβ, βHβ };
public void awake(){}
public void GenerateArea(){}
}
}
by user 151660356224286721